Tuning query SQL
Some best practices exist for writing queries.
These best practices include the following ones:
- Use a wildcard only at the end of a string search value (use
STARTS WITHfor aLIKEquery). - Create Oracle Function-based or DB2® Generated Column Indexes for Case-Insensitive string comparisons
- Join only one or two tables at a time in a query
- Avoid unnecessary
ORDER BYclauses - Use the
INTERSECTSoperator for multiple List Property OR conditions
For more information, see the "Best Practices for Searches" section in the topic Working with Queries. For information about the requirements for high performance CBR searches, see CBR Queries.