Database segment searching
First Claim
1. A method comprising:
- receiving a segment of a database stored on a non-transitory computer-readable medium, the segment encompassing a plurality of records of the database less than a total number of records of the database the plurality of records are referred to as segment records, where one or more of the segment records have values for a field of the database;
determining and storing a plurality of lowest values of the segment records for the field and a plurality of highest values of the segment records for the field;
determining and storing a bitmap for the segment, one or more selected bits of the bitmap each corresponding to a different value for the field, each selected bit set to one where one or more of the segment records have the value to which the selected bit corresponds and set to zero where none of the segment records have the value to which the selected bit corresponds;
determining and storing an index for the segment, the index relating to only the segment records and not to the records of the database other than the segment records;
loading the segment into memory from the non-transitory computer-readable medium to locate one or more selected records of the database that satisfy a query, wherein the lowest values and the highest values, and the bitmap, each separately permits determination of whether the segment is loaded, without having to use the index to make a determination, wherein where the one or more selected bits of the bitmap that each correspond to a different value for the field are set, one or more of the segment records definitively include the different value for the field; and
searching, using the index, the segment records after the segment is loaded into the memory, to at least partially locate the selected records that satisfy the query.
2 Assignments
0 Petitions
Accused Products
Abstract
A segment encompasses a number of segment records less than the total number of records of a database. The segment records have values for a field of the database. Lowest and highest values of the segment records for the field, and a bitmap for the segment, can be determined and stored. Selected bits of the bitmap each correspond to a value for the field. Each selected bit is set to one where at least one segment record has the value to which the bit corresponds. An index relating to just the segment records can be determined and stored. The lowest and highest values, and the bitmap, are adapted to permit determination of whether the segment has to be loaded into memory to locate records that satisfy a query. The index is adapted to permit searching of the segment records after the segment has been loaded into the memory.
15 Citations
13 Claims
-
1. A method comprising:
-
receiving a segment of a database stored on a non-transitory computer-readable medium, the segment encompassing a plurality of records of the database less than a total number of records of the database the plurality of records are referred to as segment records, where one or more of the segment records have values for a field of the database; determining and storing a plurality of lowest values of the segment records for the field and a plurality of highest values of the segment records for the field; determining and storing a bitmap for the segment, one or more selected bits of the bitmap each corresponding to a different value for the field, each selected bit set to one where one or more of the segment records have the value to which the selected bit corresponds and set to zero where none of the segment records have the value to which the selected bit corresponds; determining and storing an index for the segment, the index relating to only the segment records and not to the records of the database other than the segment records; loading the segment into memory from the non-transitory computer-readable medium to locate one or more selected records of the database that satisfy a query, wherein the lowest values and the highest values, and the bitmap, each separately permits determination of whether the segment is loaded, without having to use the index to make a determination, wherein where the one or more selected bits of the bitmap that each correspond to a different value for the field are set, one or more of the segment records definitively include the different value for the field; and searching, using the index, the segment records after the segment is loaded into the memory, to at least partially locate the selected records that satisfy the query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A non-transitory computer-readable medium having a computer program stored thereon, where execution of the computer programs by a processor of a computing device causes a method to be performed, the method comprising:
-
receiving a query requesting one or more selected records of a total number of records of a database stored on non-volatile storage, the database including a segment encompassing a plurality of records of the database less than the total number of records of the database and that are referred to as segment records, where one or more of the segment records have values for a field of the database; determining whether to search the segment records against the query by; determining whether the query encompasses any of a plurality of lowest values of the segment records for the field or any of a plurality of highest values of the segment records for the field, determining whether any of one or more given values encompassed by the query has a corresponding selected bit within a bitmap, the bitmap including one or more selected bits that each correspond to a different value for the field, each selected bit set to one where one or more of the segment records have the value to which the selected bit corresponds and set to zero where none of the segment records have the value to which the selected bit corresponds, wherein where the one or more selected bits of the bitmap that each correspond to a different value for the field are set, one or more of the segment records definitively include the different value for the field; wherein, the lowest values and the highest values and the bitmap separately permits determination whether to search the segment records against the query; in response to determining that the segment records are to be searched against the query, loading the segment, including all the segment records, from the non-volatile storage into memory, such that all the segment records of the segment are simultaneously located within the memory, the memory being faster to access than the non-volatile storage is; and
,after loading the segment into the memory, searching the segment records, as loaded into the memory, against the query by using the index for the segment, to at least partially locate the selected records that satisfy the query, where the index relates to just the segment records and not to the records of the database other than the segment records; in response to determining that the segment records are not to be searched against the query, skipping the segment, such that none of the segment records are loaded into the memory and such that segment records are not searched to locate the selected records that satisfy the query, wherein where the one or more selected bits of the bitmap that each correspond to a different value for the field are set, one or more of the segment records definitively include the different value for the field. - View Dependent Claims (11)
-
-
12. A system comprising:
-
a processor; a non-volatile storage storing a database, the database including a segment, the segment encompassing a plurality of records of the database less than a total number of records of the database and that are referred to as segment records; memory that is accessible faster than the non-volatile storage is; a non-transitory computer-readable medium storing a computer program, the computer program executed by the processor to load the segment records from the non-volatile storage into the memory, such that all the segment records of the segment are simultaneously located within the memory, to search the segment records against the query; a first condition being that the query encompasses any of a plurality of lowest values of the segment records for the field or any of a plurality of highest values of the segment records for the field; a second condition being that any of one or more given values encompassed by the query has a corresponding selected bit within a bitmap that is equal to one, the bitmap including one or more selected bits that each correspond to a different value for the field, each selected bit set to one where one or more of the segment records have the value to which the selected bit corresponds and set to zero where none of the segment records have the value to which the selected bit corresponds; wherein the computer program executed by the processor loads the segment records from the non-volatile storage into the memory responsive to both of the first condition and the second condition being satisfied, without using an index for the segment of the segment records, wherein the second condition where the one or more selected bits of the bitmap that each corresponding to a different value for the field are set, one or more of the segment records definitively include the different value for the field; wherein the computer program is further executed by the processor to, after loading the segment records into the memory, search the segment records against the query by using the index for the segment, to at least partially locate the selected records that satisfy the query, the index relating to just the segment records and not to the records of the database other than the segment records. - View Dependent Claims (13)
-
Specification