×

Optimizer statistics and cost model for in-memory tables

  • US 10,073,885 B2
  • Filed: 07/22/2015
  • Issued: 09/11/2018
  • Est. Priority Date: 05/29/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • receiving, at a database server, a query that requires performance of particular operations;

    wherein the particular operations include operations that access a particular set of data items;

    wherein copies of the data items of the particular set of data items reside in a particular row-major table on persistent storage;

    wherein additional copies of at least a subset of the particular set of data items reside, in volatile memory, in one or more column-major in-memory compression-units;

    evaluating a plurality of alternative execution plans for performance of the particular operations;

    wherein the plurality of alternative execution plans includes at least;

    a first execution plan that performs a full table scan that accesses copies of data items in the one or more column-major in-memory compression-units;

    a second execution plan that does not perform a full table scan that accesses copies of data items in the one or more column-major in-memory compression-units;

    for each execution plan of the plurality of alternative execution plans, determining a cost associated with the execution plan;

    wherein determining the cost for the first execution plan includes at least one of;

    determining what fraction of the particular row-major table is duplicated in the one or more column-major in-memory compression units;

    determining how many column-major in-memory compression-units will need to be scanned, as part of the full table scan, after pruning non-matching column-major in-memory compression-units based on (a) filter predicates of the query, and (b) minimum and maximum values maintained for each column-major in-memory compression-unit;

    determining a decompression cost for decompressing those column-major in-memory compression-units to be used during performance of the full table scan;

    determining a row-stitching cost that represents overhead required to produce row-major results from data items extracted from column-major in-memory compression-units;

    ordetermining a journal-scan cost for scanning a journal, maintained in volatile memory, that contains updates for data items that have become invalid in the one or more column-major in-memory compression-units;

    selecting a particular execution plan, of the plurality of alternative execution plans, based on the cost determined for the particular execution plan;

    obtaining a result set for the query by executing the particular execution plan; and

    returning the result set of the query.

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