Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    SQL "select count" is slow

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Problem Symptoms:
    SQL "select count" on certain Aleph tables takes minutes to run (-- rather than the expected seconds).

    If the underlaying table has not been recreated in many years and the main Oracle index (such as, z30_id, z01_id, etc.) has, likewise, not been rebuilt in many years, and there have been many additions-to / deletions-from the table, the Oracle index can become fragmented. {util a/17/15 ("Analyze Index") is intended to show the degree of fragmentation of the index.}

    Running util a/17/3 to recreate the Oracle indexes -- especially the znn_id index -- has been shown, at least in some cases, to *drastically* improve the response time on "select count".

    Additional Information

    It's unclear what the effect is on slowness in performing actual Aleph functions, but it would seem that the above would improve the performance of any function reading through the table sequentially.

    Category: Oracle (500)

    • Article last edited: 10/23/2014