While working on Performance issues, I came across a rarely used user property known as ‘Use Literals For Like’.

Purpose:

If you have gone through logs sometime then you might have noticed that if you query with a text in a field then the query generated at backend has lot of like clauses which queries with all the permutations and combinations for that text. For example if I query on the Last Name Field with “SADMIN” in application the query generated at backend might have clause as shown below

((T11.LAST_NAME LIKE :2 OR T11.LAST_NAME LIKE :3 OR T11.LAST_NAME LIKE :4 OR T11.LAST_NAME LIKE :5) AND UPPER(T11.LAST_NAME) = UPPER(:6))

And the bind variables will have values like

Now, this can lead to performance issues in cases if the query is done on long fields such as Comments or Description field in Service Request BC. In that case using this user property might help.

  • 2:= ‘sa%’
  • 3:= ‘Sa%’
  • 4: = ’sA%’
  • 5:= ‘SA%’
  • 6:= ‘SADMIN’

If you use this user property on a particular field then for that field bind variables will not be used, it will be replaced by the values directly.

Usage:

It is a field level user property. Follow the steps given below to define this property.

  • Open Siebel Tools
  • Query for the BC which contains the field on which you want to define the user property
  • Query for the Field
  • Click on the + sign on Field Object in Object Explorer
  • Select Field User Property Object
  • In the Field User Property List Applet create a New Record
  • Provide following detail
    Name: Use Literals For Like
    Value: TRUE

And you are done. After you do that the query generated on backend will not use bind variables for this particualr column and your query will look like

(T11.LAST_NAME LIKE ‘SADMIN%’)

OkAvarageGoodVery GoodExcellent (6 votes, average: 3.5 out of 5)
Loading ... Loading ...