Maintaining very large indexes supporting efficient relational querying
AssigneeJoint Technology Corporation
InventorsMariano Paulo Consens, Timothy Snider
Life of this patent
Estimating the term…
Abstract
The merger of a small sort vector with a big sort vector by the use of low limit and high limit pointers which are initialized to point into the big sort vector for each entry in the small sort vector. The merge of the big and small sort vectors is carried out by successive refinement passes through the small sort vector to achieve the convergence of the low and high limit pointers. The convergence point for the pointers indicates the insertion point for each entry in the small sort vector in the big sort vector. The converged limit pointers are used to define the merged big and small sort vectors.
Claims10
A method for merging a first sort vector and a second sort vector, the respective sort vectors each being represented by an appropriate data structure,
- each sort vector comprising a set of runs of contiguous entries comprising self-referencing pointers defining sequences of data, the method comprising the steps of
- a) creating a location data structure comprising, for each entry in the first sort vector, a low limit pointer and high limit pointer pair,
- b) for each entry in the first sort vector, where there is a run in the second sort vector corresponding to the entry in the first sort vector, initializing the location data structure by defining the low limit pointer and the high limit pointer to point to the entire range of the run in the second sort vector corresponding to the entry in the first sort vector, and where there is no run in the second sort vector corresponding to the entry in the first sort vector, setting the low limit pointer and the high limit pointer to values representing a no match condition,
- c) making successive refinement passes through the first sort vector and the second sort vector until each low limit pointer and high limit pointer pair has converged, each refinement pass comprising the steps of
- i) selecting successive entries in the first sort vector,
- ii) for the selected entry in the first sort vector, following the entry's self-referential pointer to a following first sort vector entry,
- iii) defining as target values the location data structure low limit pointer and high limit pointer for the location data structure entry corresponding to the following first sort vector entry,
- iv) defining as current second sort vector entry values the location data structure low limit pointer and high limit pointer corresponding to the selected first sort vector entry,
- v) in the range in the second sort vector defined by the current second sort vector entry values, locating the insertion points of the target values,
- vi) replacing the target values in the location data structure entry corresponding to the following first sort vector entry with the insertion points of the target values,
- d) using the corresponding converged low limit and high limit pointer pair to determine an insertion point into the second sort vector for each entry in the first sort vector and to thereby merge the first sort vector and the second sort vector into a merged sort vector.
A method for merging a first data index and a second data index, to generate a merged data index,
- the first and second data indexes each comprising location data structures comprising a key string data structure, a word list string data, a word list data structure, and an inverted file data structure,
- the first and second data indexes further comprising lexicographic data structures comprising a sort vector data structure, a join bit data structure, a lexicographic permutation data structure, and an inverse lexicographic permutation data structure,
- the method comprising the steps of
- a) merging the fast and second key string data structures to form a merged key string data structure,
- b) merging the first and second word list string data structure to form a merged word list string data structure,
- c) merging the first and second inverted file data structures to form a merged inverted file data structure,
- d) finding the lexicographic insertion points for the lexicographic data structures,
- e) merging the first and second lexicographic permutation data structures to form a merged lexicographic permutation data structure,
- f) merging the first and second inverse lexicographic permutation data structures to form a merged inverse lexicographic permutation data structure,
- g) merging the first and second sort vector data structures to form a merged sort vector data structure, and
- h) merging the first and second join bit data structures to form a merged join bit data structure.
A computer program product for use with a computer comprising a central processing unit and random access memory, said computer program product comprising a computer usable medium having computer readable code means embodied in said medium for maintaining indexes for relational querying, said computer program product comprising:
- a) computer readable program code for causing a computer to merge a first sort vector and a second sort vector, the respective sort vectors each being represented by an appropriate data structure, each sort vector comprising a set of runs of contiguous entries comprising self-referencing pointers defining sequences of data,
- b) computer readable program code for causing a computer to create a location data structure comprising, for each entry in the first sort vector, a low limit pointer and high limit pointer pair,
- c) computer readable program code for causing a computer to, for each entry in the first sort vector, here there is a run in the second sort vector corresponding to the entry in the first sort vector, initialize the location data structure by defining the low list pointer and the high limit pointer to point to the entire range of the run in the second sort vector corresponding to the entry in the first sort vector, and where there is no ran in the second sort vector corresponding to the entry in the first sort vector, set the low limit pointer and the high limit pointer to values representing a no match condition,
- d) computer readable programs code for causing a computer to make successive refinement passes through the first sort vector and the second sort vector until each low limit pointer and high limit pointer pair has converged, each refinement pass comprising the steps of
- i) selecting successive entries in the first sort vector,
- ii) for the selected entry in the first sort vector, following the entry's self-referential pointer to a following fir sort vector entry,
- iii) defining as target values the location data structure low limit pointer and high limit pointer for the location data structure entry corresponding to the following first sort vector entry,
- iv) defining as current second sort vector entry values the location data structure low limit pointer and high limit pointer corresponding to the selected first sort vector entry,
- v) in the range in the second sort vector defined by the current second sort vector entry values, locating the insertion points of the target values,
- vi) replacing the target values in the location data structure entry corresponding to the following first sort vector entry with the insertion points of the target values,
- e) computer readable program code for causing a computer to use the corresponding converged low and high limit pointer pair to determine an insertion point into the second sort vector for each entry in the first sort vector and to thereby merge the first sort vector and the second sort vector into a merged sort vector.
A computer program product for use with a computer comprising a central said computer program product processing unit and random access memory, said computer program product comprising a computer usable medium having computer readable code means embodied in said medium for maintaining indexes for relational querying, said indexes each comprising location data structures comprising a key string data structure, a word list string data structure, a word list data structure, and an inverted file, data structure, and each further comprising lexicographic data structures comprising a sort vector data structure, a join bit data structure, a lexicographic permutation data structure, and an inverse lexicographic permutation data structure, said computer program product comprising computer readable program code for causing a computer to merge a first data index ad a second data index, to generate a merged data index, said computer program product further comprising,
- a) computer readable program code for causing a computer to merge the first and second key string data structures to form a merged key string data structure,
- b) computer readable program code for causing a computer to merge the first and second word list string data structures to form a merged word list string data structure,
- c) computer readable program code for causing a computer to merge the first and second inverted file data structures to form a merged inverted file data structure,
- d) computer readable program code for causing a computer to find the lexicographic insertion points for the lexicographic data structures,
- e) computer readable program code for causing a computer to merge the first and second lexicographic permutation data structures to form a merged lexicographic permutation data structure,
- f) computer readable program code for causing a computer to merge the first and second inverse lexicographic permutation data structures to form a merged inverse lexicographic permutation data structure,
- g) computer readable program code for causing a computer to merge the first and second sort vector data structures to form a merged sort vector data structure, and
- h) computer readable program code for causing a computer to merge the first and second join bit data structures to form a merged join bit data structure.
Dependencies are inferred from the claim text.