Siebel Developer's Reference > User Properties > Field User Properties >

Using Literals Instead of Bind Variables


The Use Literals For Like field user property uses a literal instead of a bind variable as the criteria for a LIKE predicate in the SQL code that Siebel CRM uses to query a field. The value for this user property must include one of the following values:

  • TRUE. Siebel CRM uses a literal instead of a bind variable. For example:

    LIKE "ABC%"

    where:

    • The % (percentage symbol) specifies the exact location of the wildcard.
  • FALSE or this field user property does not exist. Siebel CRM uses a bind variable. If a search string includes a wildcard, such as * or ?, then Siebel CRM creates the following predicate to represent this wildcard:

    LIKE ?

You can configure Siebel CRM to deactivate this user property, to modify the value for it, or to create a new instance of it, but no more than one instance for a single field.

How Siebel CRM Handles Wildcards

To include a wildcard in a search string, the user can explicitly include it. For example, "ABC*" or "*ABC?". Siebel CRM can also append a trailing wildcard (*) if all of the following items are true:

  • The search string does not contain any wildcard. For example: "ABC".
  • The = (equal) sign does not precede the search string.
  • The AutomaticTrailingWildcards parameter in the InfraUIFramework section of the application CFG file is set to TRUE or does not exist. The uagent.cfg file is an example of an application CFG file. If this parameter is:
    • TRUE. Siebel CRM automatically creates a trailing wildcard or adds a LIKE predicate. If you use a script, and if this script creates a query, then Siebel CRM adds a LIKE statement to the SQL that this script creates.
    • FALSE or does not exist. Siebel CRM does not automatically create a trailing wildcard or add a LIKE predicate. It typically sets this parameter to FALSE to avoid using the Use Literals For Like user property.

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.
Siebel Developer's Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.