×

Materializing expressions within in-memory virtual column units to accelerate analytic queries

  • US 10,204,135 B2
  • Filed: 05/04/2016
  • Issued: 02/12/2019
  • Est. Priority Date: 07/29/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • storing, in volatile or non-volatile memory, a set of one or more column units;

    wherein the set of one or more column units correspond to one or more columns;

    wherein each column unit of the set of one or more column units includes data items from the column to which the column unit corresponds;

    wherein the one or more columns belong to one or more on-disk tables within a database managed by a database server instance;

    wherein the set of one or more column units includes a particular column unit that corresponds to at least one particular column of a particular table within the database;

    storing, in volatile or non-volatile memory, a set of one or more virtual column units;

    wherein the set of one or more virtual column units includes a particular virtual column unit that stores results that are derived by evaluating an expression on the at least one particular column;

    storing, in volatile or non-volatile memory, data that associates the set of one or more column units with the set of one or more virtual column units;

    wherein the set of one or more column units belong to a first in-memory columnar unit;

    wherein the set of one or more virtual column units belong to a first in-memory expression unit;

    wherein the first in-memory columnar unit and the first in-memory expression unit correspond to a first set of rows from the one or more columns;

    wherein the results stored in the particular virtual column unit are derived using values in the first set of rows from the at least one particular column;

    wherein the first set of rows include a first row and a second row;

    maintaining, within a shared metadata unit, data that indicates which rows in the first set of rows have become stale within both the first in-memory columnar unit and the first in-memory expression unitstoring, in volatile or non-volatile memory, data that associates the shared metadata unit with the first in-memory columnar unit and the first in-memory expression unit;

    in response to detecting an update to the first row, updating the data in the shared metadata unit to indicate that, within both the first in-memory columnar unit and the first in-memory expression unit, the first row has become stale;

    after updating the data in the shared metadata unit, receiving a query that requires evaluation of the expression;

    in response to receiving the query;

    based on the data in the shared metadata unit, determining that, within the first in-memory columnar unit and the first in-memory expression unit, the first row has become stale;

    responsive to determining that, within the first in-memory columnar unit and the first in-memory expression unit, the first row has become stale, evaluating the expression for the first row based on values obtained from a source other than the first in-memory columnar unit and the first in-memory expression unit;

    based on the data in the shared metadata unit, determining that, within the first in-memory columnar unit and the first in-memory expression unit, the second row is not stale; and

    responsive to determining that, within the first in-memory columnar unit and the first in-memory expression unit, the second row is not stale, obtaining results of the expression for the second row by reading cached results of the expression, for the second row, from the first in-memory expression unit.

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