IP Library Granted Patent US 8,719,254
Granted Patent B2
US 8,719,254 · App. 13/327,691 · Granted May 6, 2014

Efficient querying using on-demand indexing of monitoring tables

Inventors: Jinlin Yang (Redmond, WA); Michael Y. Levin (Sammamish, WA)
Assignee: Microsoft Corporation
G06F17/30312
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,719,254
App. No.
13/327,691
Granted
May 6, 2014
Kind
B2
Abstract

Embodiments are directed to replicating database tables for efficient data querying and to using a background task to update a database index table on a periodic basis. In one scenario, a computer system accesses an existing, original time-based database table that includes various entities and properties for each entity. Each entity also includes a time stamp value. The computer system receives an indication that the new index table is to be indexed according to a user-specified property and sorts the new index table based on both the value of the user-specified property and the time stamp value of the entity to which the user-specified property belongs. The computer system then periodically copies the entities and associated properties of the original time-based database table into a new database index table.

Claims (55)

1. At a computer system including at least one processor and a memory, in a computer networking environment including a plurality of computing systems, a computer-implemented method for replicating database tables for efficient data querying, the method comprising:

an act of accessing an existing, original time-based database table that includes a plurality of rows and one or more columns, each row being assigned a corresponding time stamp, the plurality of rows being sorted within the time-based database table according the corresponding time stamp of each row;

an act of receiving an indication that an index table, corresponding to the time-based database table, is to be indexed according to a user-specified index column selected from among the one or more columns; and

an act of copying at least a portion of each of the plurality of rows of the time-based database table into the index table, the index table including a plurality of index table rows that are each assigned a corresponding partition key, the plurality of index table rows being sorted according to partition key, wherein copying the plurality of rows of the time-based database table into the index table includes, for each of the plurality of rows of the time-based database table:

concatenating the corresponding time stamp of each row with a value of the corresponding user-specified index column that corresponds to the row; and

storing at least a portion of data of the row within a corresponding index table row of the plurality of index table rows, the corresponding index table row having a value comprising the corresponding partition key for the index table row that comprises the concatenation of the corresponding time stamp of the row with the value of the corresponding user-specified index column that corresponds to the row, wherein storing at least a portion of data of the row within a corresponding index table row of the plurality of index table rows includes:

determining that two or more rows of the plurality of rows of the time-based database table have the same column value for the user-specified index column;

generating a serialized string for the two or more rows that have the same column value for the user-specified index column;

compressing the serialized string to generate a binary chunk for the two or more rows that have the same column value for the user-specified index column; and

storing the binary chunk within a column entry of the corresponding index table row.

2. The method of claim 1 , wherein the user-specified index column comprises a specified column by which the rows are to be sorted.

3. The method of claim 1 , further comprising:

receiving a request from a user querying for a particular column value over a user-defined time period; and

returning each occurrence of the column value over the user-defined time period based on querying the index table.

4. The method of claim 1 , wherein the plurality of rows and their associated columns are copied from the original time-based database table to the index table at a user-specified interval using processing tasks.

5. The method of claim 4 , wherein each task includes a task definition that comprises the name of the original time-based database table, the name of the column to be copied to the index table and a specified time delay for the task.

6. The method of claim 5 , wherein the specified time delay allows sufficient time for the original time-based database table to be populated.

7. The method of claim 6 , wherein metadata associated with the original time-based database table is updated to indicate that indexing has been enabled for a specified column.

8. The method of claim 1 , wherein the creation of the index table on a defined periodic basis allows expired data to be deleted by deleting those index tables that correspond to expired time ranges.

9. The method of claim 1 , wherein concatenating the corresponding time stamp of each row with a value of the corresponding user-specified index column that corresponds to the row comprises inserting one or more characters between the corresponding time stamp and the value.

10. A computer system, comprising:

one or more hardware processors; and

one or more computer-readable media having stored thereon computer-executable instructions that, when executed by the one or more hardware processors, cause the computer system to implement a method for replicating database tables for efficient data querying, the method comprising:

an act of accessing an existing, original time-based database table that includes a plurality of rows and one or more columns, each row being assigned a corresponding time stamp, the plurality of rows being sorted within the time-based database table according the corresponding time stamp of each entity;

an act of receiving an indication that an index table, corresponding to the time-based database table, is to be indexed according to a user-specified index column selected from among the one or more columns; and

an act of copying at least a portion of each of the plurality of rows of the time-based database table into the index table, the index table including a plurality of index table rows that are each assigned a corresponding partition key, the plurality of index table rows being sorted according to partition key, wherein copying the plurality of rows of the time-based database table into the index table includes, for each of the plurality of rows of the time-based database table:

concatenating the corresponding time stamp of each row with a value of the corresponding user-specified index column that corresponds to the row; and

storing at least a portion of data of the row within a corresponding index table row of the plurality of index table rows, the corresponding index table row having a value comprising the corresponding partition key for the index table row that comprises the concatenation of the corresponding time stamp of the row with the value of the corresponding user-specified index column that corresponds to the row, wherein storing at least a portion of data of the row within a corresponding index table row of the plurality of index table rows includes:

determining that two or more rows of the plurality of rows of the time-based database table have the same column value for the user-specified index column;

generating a serialized string for the two or more rows that have the same column value for the user-specified index column;

compressing the serialized string to generate a binary chunk for the two or more rows that have the same column value for the user-specified index column; and

storing the binary chunk within a column entry of the corresponding index table row.

11. The computer system of claim 10 , further comprising:

receiving a request from a user querying for a particular column value over a user-defined time period; and

returning each occurrence of the column value over the user-defined time period based on querying the index table.

12. The computer system of claim 10 , wherein the plurality of rows and their associated columns are copied from the original time-based database table to the index table at a user-specified interval using processing tasks.

13. The computer system of claim 10 , wherein the creation of the index table on a defined periodic basis allows expired data to be deleted by deleting those index tables that correspond to expired time ranges.

14. One or more non-volatile computer storage devices having stored thereon computer-executable instructions that, when executed by one or more processor of a computer system, cause the computer system to implement a method for replicating database tables for efficient data querying, the method comprising:

an act of accessing an existing, original time-based database table that includes a plurality of rows and one or more columns, each row being assigned a corresponding time stamp, the plurality of rows being sorted within the time-based database table according the corresponding time stamp of each row;

an act of receiving an indication that an index table, corresponding to the time-based database table, is to be indexed according to a user-specified index column selected from among the one or more columns; and

an act of copying at least a portion of each of the plurality of rows of the time-based database table into the index table, the index table including a plurality of index table rows that are each assigned a corresponding partition key, the plurality of index table rows being sorted according to partition key, wherein copying the plurality of rows of the time-based database table into the index table includes, for each of the plurality of rows of the time-based database table:

concatenating the corresponding time stamp of each row with a value of the corresponding user-specified index column that corresponds to the row; and

storing at least a portion of data of the row within a corresponding index table row of the plurality of index table rows, the corresponding index table row having a value comprising the corresponding partition key for the index table row that comprises the concatenation of the corresponding time stamp of the row with the value of the corresponding user-specified index column that corresponds to the row, wherein storing at least a portion of data of the row within a corresponding index table row of the plurality of index table rows includes:

determining that two or more rows of the plurality of rows of the time-based database table have the same column value for the user-specified index column;

generating a serialized string for the two or more rows that have the same column value for the user-specified index column;

compressing the serialized string to generate a binary chunk for the two or more rows that have the same column value for the user-specified index column; and

storing the binary chunk within a column entry of the corresponding index table row.

15. One or more non-volatile computer storage devices of claim 14 , wherein the user-specified index column comprises a specified column by which the rows are to be sorted.

16. One or more non-volatile computer storage devices of claim 14 , further comprising:

receiving a request from a user querying for a particular column value over a user-defined time period; and

returning each occurrence of the column value over the user-defined time period based on querying the index table.

17. One or more non-volatile computer storage devices of claim 14 , wherein the plurality of rows and their associated columns are copied from the original time-based database table to the index table at a user-specified interval using processing tasks.

18. One or more non-volatile computer storage devices of claim 17 , wherein each task includes a task definition that comprises the name of the original time-based database table, the name of the column to be copied to the index table and a specified time delay for the task.

19. One or more non-volatile computer storage devices of claim 18 , wherein the specified time delay allows sufficient time for the original time-based database table to be populated.

20. One or more non-volatile computer storage devices of claim 6 , wherein metadata associated with the original time-based database table is updated to indicate that indexing has been enabled for a specified column.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034544/0541 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 27, 2011
From: YANG, JINLIN; LEVIN, MICHAEL Y.
To: MICROSOFT CORPORATION
Reel/Frame 027447/0415 →
Continuity (1)
Related Publication 20130159281A1 · Jun 20, 2013