IP Library Granted Patent US 10,817,513
Granted Patent B2
US 10,817,513 · App. 15/634,422 · Granted Oct 27, 2020

Fair scheduling for mixed-query loads

Inventors: Michael Harris (Palo Alto, CA); John Carrino (Palo Alto, CA); Eric Wong (San Mateo, CA)
Assignee: Palantir Technologies Inc.
G06F16/24535G06F16/2453G06F16/2455G06F16/24542G06F16/951
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,817,513
App. No.
15/634,422
Granted
Oct 27, 2020
Kind
B2
Abstract

A fair scheduling system with methodology for scheduling queries for execution by a database management system in a fair manner. The system obtains query jobs for execution by the database management system and cost estimates to execute the query jobs. Based on the cost estimates, the system causes the database management system to execute the query jobs as separate sub-query tasks in a round-robin fashion. By doing so, the execution latency of low cost query jobs that return few results is reduced when the query jobs are concurrently executed with high cost query jobs that return many results.

Claims (60)

1. A computing system, comprising:

one or more processors;

storage media;

one or more programs stored in the storage media and configured for execution by the one or more processors, the one or more programs comprising instructions configured for:

obtaining a query for execution by a database management system and a cost estimate for the database management system to execute the query;

enqueuing an item for the query onto a queue, the queue having a head, a tail, and a maximum number of allowed items;

based, at least in part, on the cost estimate, dividing the query into a plurality of sub-queries;

based, at least in part, on an item for the query reaching the head of the queue, causing a first sub-query of the plurality of sub-queries to be executed by the database management system; and

based, at least in part, on determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system:

re-enqueuing an item for the query onto the tail of the queue if a current number of items in the queue is less than the maximum number of allowed items, or

waiting until a current number of items in the queue is less than the maximum number of allowed items before re-enqueuing an item for the query onto the tail of the queue if a current number of items in the queue is not less than the maximum number of allowed items.

2. The computing system of claim 1 , wherein the cost estimate is a number of query results the query is expected to return.

3. The computing system of claim 1 , the one or more programs comprising instructions configured for:

based, at least in part, on the determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system, re-enqueuing an item for the query onto the tail of the queue.

4. The computing system of claim 1 , the one or more programs comprising instructions configured for:

based, at least in part, on the determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system, waiting until a current number of items in the queue is less than the maximum number of allowed items before re -enqueuing an item for the query onto the tail of the queue.

5. The computing system of claim 1 , wherein the first sub-query is configured with a result limiter that limits a number of results the first sub-query returns.

6. The computing system of claim 1 , the one or more programs further comprising instructions configured for:

de-queueing an item for the query from the head of the queue; and

wherein the causing the first sub-query to be executed by the database management system is based, at least in part, on the de-queueing.

7. The computing system of claim 1 , the one or more programs further comprising instructions configured for:

based, at least in part, on determining there are no more sub-queries of the plurality of sub-queries to be executed by the database management system, not re-enqueuing an item for the query onto the tail of the queue.

8. A method performed by a computing system comprising one or more processors, storage media, and one or more programs stored in the storage media and executed by the one or more processors to perform the method, the method comprising:

obtaining a query for execution by a database management system and a cost estimate for the database management system to execute the query;

enqueuing an item for the query onto a queue, the queue having a head, a tail, and a maximum number of allowed items;

based, at least in part, on the cost estimate, dividing the query into a plurality of sub -queries;

based, at least in part, on an item for the query reaching the head of the queue, causing a first sub-query of the plurality of sub-queries to be executed by the database management system; and

based, at least in part, on determining there are more sub-queries of the plurality of sub -queries to be executed by the database management system:

re-enqueuing an item for the query onto the tail of the queue if a current number of items in the queue is less than the maximum number of allowed items, or

waiting until a current number of items in the queue is less than the maximum number of allowed items before re-enqueuing an item for the query onto the tail of the queue if a current number of items in the queue is not less than the maximum number of allowed items.

9. The method of claim 8 , wherein the cost estimate is a number of query results the query is expected to return.

10. The method of claim 8 , further comprising:

based, at least in part, on the determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system, re-enqueuing an item for the query onto the tail of the queue.

11. The method of claim 8 , further comprising:

based, at least in part, on the determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system, waiting until a current number of items in the queue is less than the maximum number of allowed items before re -enqueuing an item for the query onto the tail of the queue.

12. The method of claim 8 , wherein the first sub-query is configured with a result limiter that limits a number of results the first sub-query returns.

13. The method of claim 8 , further comprising:

de-queueing an item for the query from the head of the queue; and

wherein the causing the first sub-query to be executed by the database management system is based, at least in part, on the de-queueing.

14. The method of claim 8 , further comprising:

based, at least in part, on determining there are no more sub-queries of the plurality of sub-queries to be executed by the database management system, not re-enqueuing an item for the query onto the tail of the queue.

15. One or more non-transitory computer-readable media storing one or more one or more programs for execution by a computing system comprising one or more processors and storage media, the one or more programs comprising instructions configured for:

obtaining a query for execution by a database management system and a cost estimate for the database management system to execute the query;

enqueuing an item for the query onto a queue, the queue having a head, a tail, and a maximum number of allowed items;

based, at least in part, on the cost estimate, dividing the query into a plurality of sub -queries;

based, at least in part, on an item for the query reaching the head of the queue, causing a first sub-query of the plurality of sub-queries to be executed by the database management system; and

based, at least in part, on determining there are more sub-queries of the plurality of sub -queries to be executed by the database management system:

re-enqueuing an item for the query onto the tail of the queue if a current number of items in the queue is less than the maximum number of allowed items, or

waiting until a current number of items in the queue is less than the maximum number of allowed items before re-enqueuing an item for the query onto the tail of the queue if a current number of items in the queue is not less than the maximum number of allowed items.

16. The one or more non-transitory computer-readable media of claim 15 , wherein the cost estimate is a number of query results the query is expected to return.

17. The one or more non-transitory computer-readable media of claim 15 , the one or more programs comprising instructions configured for:

based, at least in part, on the determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system, re-enqueuing an item for the query onto the tail of the queue.

18. The one or more non-transitory computer-readable media of claim 15 , the one or more programs comprising instructions configured for:

based, at least in part, on the determining there are more sub-queries of the plurality of sub-queries to be executed by the database management system, waiting until a current number of items in the queue is less than the maximum number of allowed items before re -enqueuing an item for the query onto the tail of the queue.

19. The one or more non-transitory computer-readable media of claim 15 , wherein the first sub-query is configured with a result limiter that limits a number of results the first sub -query returns.

20. The one or more non-transitory computer-readable media of claim 15 , the one or more programs further comprising instructions configured for:

de-queueing an item for the query from the head of the queue; and

wherein the causing the first sub-query to be executed by the database management system is based, at least in part, on the de-queueing.

21. The one or more non-transitory computer-readable media of claim 15 , the one or more programs further comprising instructions configured for:

based, at least in part, on determining there are no more sub-queries of the plurality of sub-queries to be executed by the database management system, not re-enqueuing an item for the query onto the tail of the queue.

Assignments (7)
SECURITY INTEREST Recorded Jul 3, 2022
From: PALANTIR TECHNOLOGIES INC.
To: WELLS FARGO BANK, N.A.
Reel/Frame 060572/0506 →
ASSIGNMENT OF INTELLECTUAL PROPERTY SECURITY AGREEMENTS Recorded Jul 3, 2022
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: WELLS FARGO BANK, N.A.
Reel/Frame 060572/0640 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ERRONEOUSLY LISTED PATENT BY REMOVING APPLICATION NO. 16/832267 FROM THE RELEASE OF SECURITY INTEREST PREVIOUSLY RECORDED ON REEL 052856 FRAME 0382. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Aug 26, 2021
From: ROYAL BANK OF CANADA
To: PALANTIR TECHNOLOGIES INC.
Reel/Frame 057335/0753 →
SECURITY INTEREST Recorded Jun 4, 2020
From: PALANTIR TECHNOLOGIES INC.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 052856/0817 →
RELEASE OF SECURITY INTEREST Recorded Jun 4, 2020
From: ROYAL BANK OF CANADA
To: PALANTIR TECHNOLOGIES INC.
Reel/Frame 052856/0382 →
SECURITY INTEREST Recorded Jan 27, 2020
From: PALANTIR TECHNOLOGIES INC.
To: ROYAL BANK OF CANADA, AS ADMINISTRATIVE AGENT
Reel/Frame 051709/0471 →
SECURITY INTEREST Recorded Jan 27, 2020
From: PALANTIR TECHNOLOGIES INC.
To: MORGAN STANLEY SENIOR FUNDING, INC., AS ADMINISTRATIVE AGENT
Reel/Frame 051713/0149 →