Guidelines for Using Literals Instead of Bind Variables

Caution: Avoid or minimize using the Use Literals For Like field user property. It can use resources because it requires more SQL code parsing that can cause a package cache overflow. It is recommended that you use it only after testing indicates that a significant performance improvement will result.

Using the Use Literals For Like user property can impact performance when compared to using a bind variable for some searches. For example:

  • A search string that includes a wildcard in a trailing position, such as "ABC*", can improve performance because Siebel CRM can choose a more appropriate index.

  • A search string that includes a wildcard in a leading position, such as "*ABC", can degrade performance. The Use Literals For Like field user property does not improve performance for this search because it does not significantly reduce the number of rows that Siebel CRM must scan.

If you configure the Use Literals For Like field user property, then use the following guidelines:

  • If poor performance exists, or if a DB2 UDB utility indicates that the optimizer does not choose indexes efficiently, then it is recommended that you use the Use Literals For Like field user property. If performance improves significantly, then deploy this configuration to your production environment.

  • Do not use the Use Literals For Like field user property to improve performance with a case-insensitive query.

  • Use a literal in a query that includes a LIKE predicate. This configuration can improve query performance on DB2 UDB. It provides information that the database optimizer can use to choose indexes for the query.