IP Library Granted Patent US 10,552,399
Granted Patent B2
US 10,552,399 · App. 15/171,408 · Granted Feb 4, 2020

Predicting index fragmentation caused by database statements

Inventor: Guy le Mar (McKinnon, AU)
Assignee: QUEST SOFTWARE INC.
G06F16/2272G06F16/24542
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 10,552,399
App. No.
15/171,408
Filed
Jun 2, 2016
Granted
Feb 4, 2020
Kind
B2
Art Unit
2168
USPC
707/718
Abstract

Systems and techniques for determining a total predicted index fragmentation associated with executing a structured query language statement are described. An execution plan associated with the structured query language statement may be determined. A plurality of tables estimated to be affected by execution of the structured query language statement may be determined. For individual tables, an estimated number of rows that the structured query language statement is to affect may be determined. A predictive model, such as a support vector machine, may be used to determine, for individual tables whose indexes are estimated to be affected, a predicted change in an average index fragmentation percentage associated with individual indexes on the affected tables. The sum of the predicted change in the average index fragmentation percentage of affected indexes may be determined to determine the total predicted index fragmentation associated with executing the structured query language statement.

Claims (111)

1. A computer-implemented method, comprising:

determining an execution plan associated with a structured query language (SQL) statement;

identifying, based on the execution plan, a first table estimated to be affected by the SQL statement;

determining a first index definition of a first index on the first table, wherein the first index includes a lookup table of the first table;

applying a first weighted value to the first index based on determining a stability of the first index, where the stability of the first index is based on whether the first index is subject to less fragmentation than another index on the first table;

determining, based on a predictive model, a first predicted change in an average index fragmentation percentage associated with the first index;

identifying a second table predicted to be affected by the SQL statement;

determining a second index definition of a second index on the second table;

applying a second weighted value to the second index based on determining the stability of the second index, where the stability of the second index is based on whether the second index is subject to less fragmentation than another index on the second table;

determining, based on the predictive model, a second predicted change in the average index fragmentation percentage associated with the second index;

determining a total predicted fragmentation based at least in part on the first weighted value, the second weight value, the first predicted change in the average index fragmentation percentage associated with the first index and the second predicted change in the average index fragmentation percentage associated with the second index; and

performing, based on the total predicted fragmentation, at least one remedial action to reduce fragmentation, the at least one remedial action being (a) creating a remedial SQL statement that creates less index fragmentation compared to other SQL statements that achieve similar results, (b) scheduling performance of a remedial SQL statement prior to an index rebuild or defragmentation that is predicted to less fragmentation, (c) identifying a remedial SQL statement for which an index may be dropped prior to executing the SQL statement and the index recreated after execution, (d) creating an index for a table that incurs less fragmentation than an alternative type of index, or (e) a combination thereof.

2. The computer-implemented method of claim 1 , wherein the predictive model is based at least in part on a support vector machine.

3. The computer-implemented method of claim 1 , wherein determining, based on the predictive model, the first predicted change in the average index fragmentation percentage associated with the first index comprises determining at least one of:

a type of a SQL operation identified in the execution plan;

a data-type of each column included in the first index;

a fill factor of the first index;

an index type of the first index, the index type including one of a clustered type or a non-clustered type;

a page-count of the first index; or

a current average index fragmentation percentage associated with the first index.

4. The computer-implemented method of claim 1 , further comprising:

determining, based on the execution plan, a first set of operations to be performed on the first table;

for individual operations in the first set of operations, determining a first estimated number of rows affected in the first table, based on the execution plan;

determining, based on the execution plan, a second set of operations to be performed on the second table; and

for each operation in the second set of operations, determining a second estimated number of rows affected in the second table, based on the execution plan.

5. The computer-implemented method of claim 4 , further comprising:

determining, based on the predictive model, the total predicted fragmentation based at least in part on:

the first predicted change in the average index fragmentation percentage associated with the first index;

the first estimated number of rows affected in the first table;

the second predicted change in the average index fragmentation percentage associated with the second index; and

the second estimated number of rows affected in the second table.

6. The computer-implemented method of claim 1 , further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold; and

scheduling execution of the SQL statement prior to defragmenting at least one of the first index or the second index.

7. The computer-implemented method of claim 1 , further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold; and

scheduling execution of the SQL statement prior to rebuilding at least one of the first index or the second index.

8. One or more non-transitory computer-readable media storing instructions that are executable by one or more processors to perform operations comprising:

determining an execution plan associated with a structured query language (SQL) statement;

identifying, based on the execution plan, a first table estimated to be affected by the SQL statement;

determining a first index definition of a first index on the first table, wherein the first index includes a lookup table of the first table;

applying a first weighted value to the first index based on determining a stability of the first index, where the stability of the first index is based on whether the first index is subject to less fragmentation than another index on the first table;

determining, based on a predictive model, a first predicted change in an average index fragmentation percentage associated with the first index;

identifying a second table predicted to be affected by the SQL statement;

determining a second index definition of a second index on the second table;

applying a second weighted value to the second index based on determining the stability of the second index, where the stability of the second index is based on whether the second index is subject to less fragmentation than another index on the second table;

determining, based on the predictive model, a second predicted change in the average index fragmentation percentage associated with the second index;

determining a total predicted fragmentation based at least in part on the first weighted value, the second weight value, the first predicted change in the average index fragmentation percentage associated with the first index and the second predicted change in the average index fragmentation percentage associated with the second index; and

performing, based on the total predicted fragmentation, at least one remedial action to reduce fragmentation, the at least one remedial action being (a) creating a remedial SQL statement that creates less index fragmentation compared to other SQL statements that achieve similar results, (b) scheduling performance of a remedial SQL statement prior to an index rebuild or defragmentation that is predicted to less fragmentation, (c) identifying a remedial SQL statement for which an index may be dropped prior to executing the SQL statement and the index recreated after execution, (d) creating an index for a table that incurs less fragmentation than an alternative type of index, or (e) a combination thereof.

9. The one or more non-transitory computer-readable media of claim 8 , the operations further comprising:

modifying the SQL statement to create a modified statement;

determining a modified execution plan associated with the modified statement;

determining a modified total predicted fragmentation associated with the modified statement; determining that the modified total predicted fragmentation associated with the modified statement is less than the total predicted fragmentation associated with the SQL statement; and

executing the modified statement instead of the SQL statement.

10. The one or more non-transitory computer-readable media of claim 8 , the operations further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold;

dropping at least the first index;

executing the SQL statement; and

recreating at least the first index.

11. The one or more non-transitory computer-readable media of claim 8 , the operations further comprising:

determining a third index definition of a third index on the first table;

determining, based on the predictive model, a third predicted change in the average index fragmentation percentage associated with the third index;

determining that the third predicted change in the average index fragmentation percentage associated with the first index is less than the first predicted change in the average index fragmentation percentage associated with the first index; and

selecting the third index for use with the first table.

12. The one or more non-transitory computer-readable media of claim 11 , the operations further comprising:

preventing the first index from being used with the first table.

13. The one or more non-transitory computer-readable media of claim 8 , wherein the first index on the first table comprises at least one of:

a current average index fragmentation percentage associated with the first index;

an index type indicating whether the first index is a clustered index or a non-clustered index; or

a page count associated with the first index.

14. A server, comprising:

one or more processors; and

one or more non-transitory computer-readable media storing instructions that are executable by the one or more processors to perform operations comprising:

determining an execution plan associated with a structured query language (SQL) statement;

identifying, based on the execution plan, a first table estimated to be affected by the SQL statement;

determining a first index definition of a first index on the first table, wherein the first index includes a lookup table of the first table;

applying a first weighted value to the first index based on determining a stability of the first index, where the stability of the first index is based on whether the first index is subject to less fragmentation than another index on the first table;

determining, based on a predictive model, a first predicted change in an average index fragmentation percentage associated with the first index;

identifying a second table predicted to be affected by the SQL statement;

determining a second index definition of a second index on the second table;

applying a second weighted value to the second index based on determining the stability of the second index, where the stability of the second index is based on whether the second index is subject to less fragmentation than another index on the second table;

determining, based on the predictive model, a second predicted change in the average index fragmentation percentage associated with the second index;

determining a total predicted fragmentation based at least in part on the first weighted value, the second weight value, the first predicted change in the average index fragmentation percentage associated with the first index and the second predicted change in the average index fragmentation percentage associated with the second index; and

performing, based on the total predicted fragmentation, at least one remedial action to reduce fragmentation, the at least one remedial action being (a) creating a remedial SQL statement that creates less index fragmentation compared to other SQL statements that achieve similar results, (b) scheduling performance of a remedial SQL statement prior to an index rebuild or defragmentation that is predicted to less fragmentation, (c) identifying a remedial SQL statement for which an index may be dropped prior to executing the SQL statement and the index recreated after execution, (d) creating an index for a table that incurs less fragmentation than an alternative type of index, or (e) a combination thereof.

15. The server of claim 14 , the operations further comprising:

determining, based on the execution plan, a first set of operations to be performed on the first table;

for individual operations in the first set of operations, determining a first estimated number of rows affected in the first table, based on the execution plan;

determining, based on the execution plan, a second set of operations to be performed on the second table; and

for individual operations in the second set of operations, determining a second estimated number of rows affected in the second table, based on the execution plan.

16. The server of claim 15 , the operations further comprising:

determining, based on the predictive model, the total predicted fragmentation based at least in part on:

the first predicted change in the average index fragmentation percentage associated with the first index;

the first estimated number of rows affected in the first table;

the second predicted change in the average index fragmentation percentage associated with the second index; and

the second estimated number of rows affected in the second table.

17. The server of claim 14 , the operations further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold; and

scheduling execution of the SQL statement prior to defragmenting at least one of the first index or the second index.

18. The server of claim 14 , the operations further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold; and

scheduling execution of the SQL statement prior to rebuilding at least one of the first index or the second index.

19. The server of claim 14 , the operations further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold;

dropping at least the first index;

executing the SQL statement; and

recreating at least the first index.

20. The server of claim 14 , the operations further comprising:

determining that the total predicted fragmentation satisfies a predetermined threshold;

dropping at least the first index;

executing the SQL statement; and

recreating at least the first index after executing the SQL statement.

Assignments (24)
RELEASE OF SECURITY INTEREST Recorded Nov 19, 2025
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: QUEST SOFTWARE INC.; ANALYTIX DATA SERVICES INC.; BINARYTREE.COM LLC; ERWIN, INC.
Reel/Frame 073606/0001 →
RELEASE OF SECURITY INTEREST Recorded Nov 18, 2025
From: GOLDMAN SACHS BANK USA, AS COLLATERAL AGENT
To: QUEST SOFTWARE INC.; ANALYTIX DATA SERVICES INC.; BINARYTREE.COM LLC; ERWIN, INC.
Reel/Frame 073613/0326 →
SECURITY INTEREST Recorded Jun 8, 2025
From: QUEST SOFTWARE INC.; ANALYTIX DATA SERVICES INC.; ERWIN, INC.
To: ALTER DOMUS (US) LLC
Reel/Frame 071527/0001 →
SECURITY INTEREST Recorded Jun 8, 2025
From: QUEST SOFTWARE INC.; ANALYTIX DATA SERVICES INC.; ERWIN, INC.
To: ALTER DOMUS (US) LLC
Reel/Frame 071527/0649 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (045455/0001) Recorded May 20, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO ASAP SOFTWARE EXPRESS, INC.); DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC CORPORATION (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MAGINATICS LLC); EMC IP HOLDING COMPANY LLC (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MOZY, INC.); SCALEIO LLC
Reel/Frame 061753/0001 →
SECOND LIEN INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Feb 2, 2022
From: QUEST SOFTWARE INC.; ANALYTIX DATA SERVICES INC.; BINARYTREE.COM LLC; ERWIN, INC.; ONE IDENTITY LLC; ONELOGIN, INC.; ONE IDENTITY SOFTWARE INTERNATIONAL DESIGNATED ACTIVITY COMPANY
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 058952/0279 →
RELEASE OF SECOND LIEN SECURITY INTEREST IN PATENTS Recorded Feb 2, 2022
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
To: QUEST SOFTWARE INC.
Reel/Frame 059096/0683 →
RELEASE OF FIRST LIEN SECURITY INTEREST IN PATENTS Recorded Feb 2, 2022
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
To: QUEST SOFTWARE INC.
Reel/Frame 059105/0479 →
FIRST LIEN INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Feb 2, 2022
From: QUEST SOFTWARE INC.; ANALYTIX DATA SERVICES INC.; BINARYTREE.COM LLC; ERWIN, INC.; ONE IDENTITY LLC; ONELOGIN, INC.; ONE IDENTITY SOFTWARE INTERNATIONAL DESIGNATED ACTIVITY COMPANY
To: GOLDMAN SACHS BANK USA
Reel/Frame 058945/0778 →
RELEASE OF SECURITY INTEREST Recorded Nov 3, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: ASAP SOFTWARE EXPRESS, INC.; AVENTAIL LLC; CREDANT TECHNOLOGIES, INC.; DELL USA L.P.; DELL INTERNATIONAL, L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; FORCE10 NETWORKS, INC.; MAGINATICS LLC; MOZY, INC.; SCALEIO LLC; WYSE TECHNOLOGY L.L.C.
Reel/Frame 058216/0001 →
CHANGE OF NAME Recorded Jun 19, 2018
From: DELL SOFTWARE INC.
To: QUEST SOFTWARE INC.
Reel/Frame 046393/0009 →
FIRST LIEN PATENT SECURITY AGREEMENT Recorded Jun 7, 2018
From: QUEST SOFTWARE INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 046327/0347 →
SECOND LIEN PATENT SECURITY AGREEMENT Recorded Jun 7, 2018
From: QUEST SOFTWARE INC.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 046327/0486 →
RELEASE OF SECURITY INTEREST Recorded Nov 4, 2016
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: AVENTAIL LLC; DELL PRODUCTS, L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION
Reel/Frame 040564/0886 →
RELEASE OF SECURITY INTEREST IN CERTAIN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (040136/0001) Recorded Nov 4, 2016
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; AVENTAIL LLC; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION
Reel/Frame 040564/0897 →
SECURITY AGREEMENT Recorded Sep 21, 2016
From: ASAP SOFTWARE EXPRESS, INC.; AVENTAIL LLC; CREDANT TECHNOLOGIES, INC.; DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; FORCE10 NETWORKS, INC.; MAGINATICS LLC; MOZY, INC.; SCALEIO LLC; SPANNING CLOUD APPS LLC; WYSE TECHNOLOGY L.L.C.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 040134/0001 →
SECURITY AGREEMENT Recorded Sep 21, 2016
From: ASAP SOFTWARE EXPRESS, INC.; AVENTAIL LLC; CREDANT TECHNOLOGIES, INC.; DELL USA L.P.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; DELL SYSTEMS CORPORATION; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; FORCE10 NETWORKS, INC.; MAGINATICS LLC; MOZY, INC.; SCALEIO LLC; SPANNING CLOUD APPS LLC; WYSE TECHNOLOGY L.L.C.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 040136/0001 →
RELEASE OF SEC. INT. IN PATENTS (NOTES) Recorded Sep 14, 2016
From: BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
To: AVENTAIL LLC; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 040026/0710 →
RELEASE OF SEC. INT. IN PATENTS (TL) Recorded Sep 14, 2016
From: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
To: AVENTAIL LLC; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 040027/0329 →
RELEASE OF SEC. INT. IN PATENTS (ABL) Recorded Sep 13, 2016
From: BANK OF AMERICA, N.A., AS ADMINISTRATIVE AGENT
To: AVENTAIL LLC; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 040013/0733 →
SUPPLEMENT TO PATENT SECURITY AGREEMENT (ABL) Recorded Aug 10, 2016
From: AVENTAIL LLC; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.
To: BANK OF AMERICA, N.A., AS ADMINISTRATIVE AGENT
Reel/Frame 039643/0953 →
SUPPLEMENT TO PATENT SECURITY AGREEMENT (TERM LOAN) Recorded Aug 10, 2016
From: AVENTAIL LLC; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 039719/0889 →
SUPPLEMENT TO PATENT SECURITY AGREEMENT (NOTES) Recorded Aug 10, 2016
From: AVENTAIL LLC; DELL PRODUCTS L.P.; DELL SOFTWARE INC.; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 039644/0084 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 2, 2016
From: LE MAR, GUY
To: DELL SOFTWARE, INC.
Reel/Frame 038786/0398 →
Continuity (1)
Related Publication 20170351721A1 · Dec 7, 2017
Cited By (1)
US 12,450,203