×

Memory structure and method for tuning a database statement using a join-tree data structure representation, including selectivity factors, of a master table and detail table

  • US 5,761,654 A
  • Filed: 06/05/1996
  • Issued: 06/02/1998
  • Est. Priority Date: 06/05/1996
  • Status: Expired due to Term
First Claim
Patent Images

1. A machine-executed method of creating a data structure in a memory device, for use in selecting an execution plan for a data access statement that specifies (i) a plurality of tables and (ii) a plurality of join conditions, each of said join conditions specifying a relationship between (x) a table that uses a key as a primary key, referred to as a master table, and (y) a table that uses a corresponding key as a foreign key, referred to as a detail table, said method comprising:

  • (a) defining a set of nodes respectively representing the tables;

    (b) defining a set of directional links between pairs of nodes each of which represents a master-detail relationship between a detail table and a corresponding master table;

    (c) defining, in a memory device, a data structure, referred to as a join tree, comprising a representation of the nodes and their directional links;

    (d) associating with the join tree a representation of a set of properties of the nodes and links, comprising;

    (1) for each node, a set of zero or more selectivity factors, each selectivity factor indicating the expected fraction of rows in the table represented by the node that satisfy one or more logical conditions set forth in the data access statement;

    (2) for each directional link associated with a detail table and a master table, (A) the ratio of (i) the number of distinct rows satisfying the join statement in the detail table A to (ii) the number of distinct rows satisfying the join statement in the master table, and (B) the probability that a row in the detail table will have a corresponding row in the master table.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×