Granular and workload driven index defragmentation
AssigneeMicrosoft Corporation
InventorsVivek Narasayya, Manoj Syamala
Life of this patent
Estimating the term…
Abstract
This patent application relates to granular and workload driven database index defragmentation techniques. These techniques allow for defragmenting individual index ranges, performing benefit analysis to estimate the impact of defragmenting indexes or index ranges, and leveraging such benefit analysis to provide automated workload-driven recommendations of index(es) or index range(s) to defragment.
Claims22
A system comprising:
- a storage engine configured to process statements of a workload that are executable over an index or logical index range of a database, wherein different statements of the workload have different corresponding weights and the different corresponding weights reflect execution frequency of the different statements of the workload;
- a defragmentation advisor module configured to use the different corresponding weights to perform a benefit analysis that estimates an impact of defragmenting the index or logical index range;
- and
- at least one hardware processor configured to execute the storage engine and the defragmentation advisor module.
One or more hardware computer-readable memory devices or hardware storage devices having instructions stored thereon that, when executed by a computing device, cause the computing device to perform acts comprising:
- obtaining a query of a workload, the query having a query argument that limits a search of an index to a particular logical range identified by the query argument, wherein the index includes a prefix range that precedes the particular logical range in the index and both the prefix range and the particular logical range identified by the query argument are fragmented;
- and
- defragmenting the particular logical range identified by the query argument while leaving the prefix range of the index fragmented,
- wherein the defragmenting the particular logical range comprises removing one or both of:
- internal fragmentation from the particular logical range identified by the query argument or removing external fragmentation from the particular logical range identified by the query argument.
A method performed by at least one computing device, the method comprising:
- obtaining a query of a workload, the query having a query argument that limits a search of an index to a particular logical range identified by the query argument, wherein the index includes a prefix range that precedes the particular logical range in the index and both the prefix range and the particular logical range identified by the query argument are fragmented;
- and
- defragmenting the particular logical range identified by the query argument while leaving the prefix range of the index fragmented,
- wherein the defragmenting the particular logical range comprises removing one or both of:
- internal fragmentation from the particular logical range identified by the query argument or removing external fragmentation from the particular logical range identified by the query argument.
Dependencies are inferred from the claim text.