Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2282

Optimizer histogram cache is sometimes never refreshed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1-incubating
    • 2.1-incubating
    • sql-cmp
    • None
    • All

    Description

      Here's the scenario:

      In session 1, create a table T1 and populate it with, say, 200000 or more rows.

      In session 2, prepare a query that selects from T1. For example, select A,COUNT FROM T1 GROUP BY A. The query should compile fine, but you should see missing statistics warning messages (warning codes 6007 and 6008).

      In session 1, do "update statistics for table t1 on every column"

      In session 2, prepare other queries over a period of time. What should happen is that after about an hour, the Optimizer decides to refresh the histograms. However, due to a bug, it might never do so. So, the missing statistics warnings (6007, 6008) never go away. Worse, the prepares never benefit from the statistics so plan choice may be poor.

      Attachments

        Activity

          People

            dbirdsall Dave Birdsall
            dbirdsall Dave Birdsall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: