SAP Hybris/SAP CX Advanced Interview Questions and Answers

Gokul Chandra Pandey
2 min readMay 6, 2019

--

What is dontOptimize attribute? And in which scenarios this can be set to true?
Answer:
Here comes another interesting attribute in the type modifiers and this is “dontOptimize”. By default it’s false. If you set dontOptimize to true, it’s vale is going to store in props table by default. “props” table uses blob data type to store such values and it is not indexed.
WhenToUse: In a scenario where you have long values for an attribute and this can’t be indexed, and you never use this attribute to search by.
UseCases 1: Creating a custom type to store list of frequently asked questions (FAQs). Which will have attributes question and answer and the values is going to be very long and you don’t want to index such values either.

FAQ model to use don’t optimize for question and answer

In the above MyFAQ type question and answer will be stored in the props table. We can use custom table for instead of props table as below by using propertyTable=”MyFAQProps” attributes in the deployment table…

Don’t optimize with Custom property table

WhatHybrisSay: Generally, Hybris doesn’t recommended to store attribute values in this way because it is more expensive to store and retrieve the values because joins are required in the queries. If you don’t compromise on performance then you can choose database and type to store.

dontOptimize with database type for performance.

For other topics of hybris and interview questions click here.

--

--