×

DISK-BASED HASH JOIN PROCESS

  • US 20140250142A1
  • Filed: 03/01/2013
  • Published: 09/04/2014
  • Est. Priority Date: 03/01/2013
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for processing a database query, the method comprising:

  • receiving a request to perform a database query specifying a join of an inner table and an outer table, wherein the inner table is smaller than the outer table;

    receiving a limit on memory used for storing a hash table;

    building the hash table using data from rows of the inner table, the hash table comprising one or more partitions, each partition comprising one or more hash buckets, each hash bucket storing data from rows that map to a hash code value based on a hashing function;

    receiving a request to add data of a new row of the inner table to the hash table;

    determining whether addition of data of the new row will cause the hash table to exceed the memory limit;

    responsive to determining that addition of data of the new row will cause the hash table to exceed the memory limit, selecting a partition of the hash table for spilling to a persistent storage area, the selecting based on whether the size of the selected partition exceeds sizes of at least a plurality of other partitions of the hash table;

    spilling the selected partition to the persistent storage area, the spilling comprising, storing data from the selected partition in the persistent storage area; and

    reusing memory space obtained from spilling the selected partition to persistent storage for storing data of the new row.

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