×

Group-by size result estimation

  • US 9,747,337 B2
  • Filed: 10/12/2012
  • Issued: 08/29/2017
  • Est. Priority Date: 03/30/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method for estimating a result size of a Group-By operation comprising:

  • receiving, by at least one computing device, the Group-By operation comprising inputs referencing database tables stored on a computer readable medium;

    calculating, by the at least one computing device, a cumulative selectivity in the Group-By operation by aggregating a normalized selectivity of a first column and a normalized selectivity of a second column,wherein the first column and the second column are referenced in the inputs of the Group-By operation,wherein the normalized selectivity for the first column is calculated using a catalogued selectivity for the first column, a size of a largest table of the database tables referenced by the inputs of the Group-By operation, and a size of a database table in which the first column resides, wherein the catalogued selectivity for the first column is a statistical value, representing a degree of uniqueness of the first column, stored in catalog tables different and distinct from the database tables,wherein the normalized selectivity for the second column is calculated using a catalogued selectivity for the second column, the size of the largest table of the database tables referenced by the inputs of the Group-By operation, and a size of a database table in which the second column resides, wherein the catalogued selectivity for the second column is a statistical value, representing a degree of uniqueness of the second column, stored in the catalog tables, andwherein a size of a particular table is a quantity of rows in the particular table; and

    allocating, by the at least one computing device, memory for the Group-By operation based upon a memory requirement responsive to the cumulative selectivity.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×