Custom indexes use for non-mandatory named-query parameters
S
Stéphanie FOURRIER
started a topic
over 2 years ago
How to make my search form or named query filter use my custom created indexes if the parameter is not mandatory ?
Best Answer
S
Stéphanie FOURRIER
said
over 2 years ago
Customers usually write
:PARAM is not null and Att = :PARAM
to apply a parameter only if it is provided by the user in the Search Form or the caller of the Named Query. But this kind of expression prevents using any custom index created (USR_xxx). Writing the following expression instead will help the optimizer using the index and render a result much faster :
Att like nvl(:PARAM, ‘%’)
Morevover, it also performs well if some functions need to be applied to the parameter, like this :
Att like nvl(upper(:PARAM), ‘%’)
Please note that this filter limits the results to records that have a non-null value for the attribute.
1 Comment
S
Stéphanie FOURRIER
said
over 2 years ago
Answer
Customers usually write
:PARAM is not null and Att = :PARAM
to apply a parameter only if it is provided by the user in the Search Form or the caller of the Named Query. But this kind of expression prevents using any custom index created (USR_xxx). Writing the following expression instead will help the optimizer using the index and render a result much faster :
Att like nvl(:PARAM, ‘%’)
Morevover, it also performs well if some functions need to be applied to the parameter, like this :
Att like nvl(upper(:PARAM), ‘%’)
Please note that this filter limits the results to records that have a non-null value for the attribute.
Stéphanie FOURRIER
How to make my search form or named query filter use my custom created indexes if the parameter is not mandatory ?
Customers usually write
to apply a parameter only if it is provided by the user in the Search Form or the caller of the Named Query. But this kind of expression prevents using any custom index created (USR_xxx). Writing the following expression instead will help the optimizer using the index and render a result much faster :
Morevover, it also performs well if some functions need to be applied to the parameter, like this :
Please note that this filter limits the results to records that have a non-null value for the attribute.
Stéphanie FOURRIER
Customers usually write
to apply a parameter only if it is provided by the user in the Search Form or the caller of the Named Query. But this kind of expression prevents using any custom index created (USR_xxx). Writing the following expression instead will help the optimizer using the index and render a result much faster :
Morevover, it also performs well if some functions need to be applied to the parameter, like this :
Please note that this filter limits the results to records that have a non-null value for the attribute.
-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 275 topics