Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6921 How good is the Derby Query Optimizer, really
  3. DERBY-6940

Enhance derby statistics for more accurate selectivity estimates.

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None

      Description

      Derby should collect extra statistics during index build time, statistics refresh time which will help optimizer make more precise selectivity estimates and chose better execution paths.

      We eventually want to utilize the new statistics to make better selectivity estimates / cost estimates that will help find the best query plan. Currently Derby keeps two type of stats - the total row count and the number of unique values.

      We are initially extending the stats to include null count, the minimum value and maximum value associated with each of the columns of an index. This would be useful in selectivity estimates for operators such as [ IS NULL, <, <=, >, >= ] , all of which currently rely on hardwired selectivity estimates.

        Attachments

        1. derby-6940.diff
          9 kB
          Harshvardhan Gupta
        2. DERBY-6940_2.diff
          12 kB
          Harshvardhan Gupta
        3. DERBY-6940_3.diff
          13 kB
          Harshvardhan Gupta
        4. EOFException.txt
          4 kB
          Bryan Pendleton
        5. EOFException_derby.log
          84 kB
          Bryan Pendleton

          Activity

            People

            • Assignee:
              harshvardhan145 Harshvardhan Gupta
              Reporter:
              harshvardhan145 Harshvardhan Gupta
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: