Enhancing performance for full-text queries

To enhance performance during searches, use one or more of the following approaches:

Procedure

  • Use the EXPLAIN statement to check the access plan of the Db2® optimizer when searching with SQL.
  • Avoid using the SCORE function without the CONTAINS function. Also, to avoid duplicate processing, ensure that the string (that is, the search argument and any search options) that you specify for the CONTAINS function exactly matches the string (including white spaces) that you use for the SCORE function.
  • Ensure that the Db2 compiler has the correct table statistics. Use the RUNSTATS command to update the statistics.
  • Review the database STMT_CONC configuration parameter. When the parameter is set to use the LITERAL option, a performance degradation may occur for text search queries.