Performance considerations during search

To enhance performance during search, consider issues when searching within SQL, with the stored procedure, or if you use the NUMBEROFMATCHES or the SCORE function without the CONTAINS function.

To enhance performance during search, consider the following issues:
  • When searching within SQL:
    • If you notice a decrease in performance, Use the explain statement to check the processing plan of the Db2® Optimizer.
    • Parametric search can make searching faster, especially if you use other search predicates to reduce the result size.
    • Use the result limit keyword if you do not require all of the results.
  • When searching with the stored procedure:
    • As the specified cache table expression is copied from the database into memory, ensure that your workstation has enough memory available for this data. If there is insufficient memory, paging space is used, which decreases search performance.
  • If you use the NUMBEROFMATCHES or the SCORE function without the CONTAINS function, query performance may decrease. Also, to avoid duplicate processing, ensure that the string in the CONTAINS function exactly matches the string used in NUMBEROFMATCHES or SCORE function.