IP Library Granted Patent US 10,409,701
Granted Patent B2
US 10,409,701 · App. 15/234,783 · Granted Sep 10, 2019

Per-statement monitoring in a database environment

Inventor: Mark Wilding (Issaquah, WA)
Assignee: salesforce.com, inc.
G06F11/30G06F16/2453
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,409,701
App. No.
15/234,783
Granted
Sep 10, 2019
Kind
B2
Abstract

One or more client threads are executed. One or more processing threads corresponding to the one or more client threads are executed. The processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread. The statistical information is generated from the processing threads. The statistical information is stored in chunks of memory managed via a plurality of queues. The chunks of memory containing the statistics are analyzed. Outlier statements are filtered based on the statistics. Non-outlier statements are stored by a storage device.

Claims (62)

1. A system comprising:

one or more hardware processing devices to execute one or more client threads and to execute one or more corresponding processing threads, wherein the processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread;

a queue processing agent communicatively coupled with the processing threads to receive the statistical information, to cause the statistical information to be stored in chunks of physical memory managed via a plurality of queues, wherein at least one queue corresponds to a completed queue of chunks and at least one queue corresponds to a processing queue of chunks, and further wherein the queue processing agent maintains at least an in-use list of chunks and at least a free list of chunks wherein the processing threads are further configurable to obtain contextual information corresponding to the database query;

a statistics agent communicatively coupled with the queue processing agent, the statistics agent to analyze the chunks of memory containing the statistics, wherein the statistics agent is configurable to generate and update aggregated statistics based on the contextual information and wherein the contextual information comprises app-specific contextual information, the app-specific contextual information comprises one or more of: a tenant identifier (tenant ID), a user identifier (user ID), and a universal resource identifier (URI);

a filtering agent communicatively coupled with the statistics agent, the filtering agent to filter outlier database query statements based on the statistics and to cause non-outlier database query statements to be stored by a physical storage device;

performing, with the one or more hardware processing devices, additional analysis on the outlier database query statements retrieved from the physical storage device prior to execution.

2. The system of claim 1 wherein the contextual information comprises database contextual information.

3. The system of claim 2 wherein the database contextual information comprises one or more of: a transaction identifier (transaction ID), a statement identifier (statement ID), a statement nest level, a plan identifier (plan ID), and bind variables.

4. The system of claim 1 wherein the database query statements comprise structured query language (SQL)-compliant database query statements.

5. The system of claim 1 wherein the statistical information comprises one or more of: statement execution time, resources consumed.

6. A method for utilizing statistical information in a database environment, the method comprising:

executing one or more client threads with one or more hardware computing devices;

executing, with the one or more hardware computing devices, one or more processing threads corresponding to the one or more client threads, wherein the processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread, wherein the processing threads are configurable, with the one or more hardware computing devices, to obtain contextual information corresponding to the database query;

generating, with the one or more hardware computing devices, the statistical information from the processing threads, wherein the one or more hardware computing devices are configurable to generate and update aggregated statistics based on the contextual information and the contextual information comprises app-specific contextual information, wherein the app-specific contextual information comprises one or more of: a tenant identifier (tenant ID), a user identifier (user ID), and a universal resource identifier (URI);

causing, with the one or more hardware computing devices, the statistical information to be stored in chunks of memory managed via a plurality of queues, wherein at least one queue corresponds to a completed queue of chunks and at least one queue corresponds to a processing queue of chunks, and further wherein the queue processing agent maintains at least an in-use list of chunks and at least a free list of chunks;

analyzing the chunks of memory containing the statistics with the one or more hardware computing devices;

filtering, with the one or more hardware computing devices, outlier statements based on the statistics; and

causing, with the one or more hardware computing devices, non-outlier statements to be stored by a physical storage device;

performing, with the one or more hardware processing devices, additional analysis on the outlier database query statements retrieved from the physical storage device prior to execution.

7. The method of claim 6 wherein the database query statements comprise structured query language (SQL)-com pliant database query statements.

8. The method of claim 6 wherein the statistical information comprises one or more of: statement execution time, resources consumed.

9. A non-transitory computer-readable medium having stored thereon sequences of instructions for utilizing statistical information in a database environment that, when executed by one or more processors, cause the one or more processors to:

execute one or more client threads;

execute one or more processing threads corresponding to the one or more client threads, wherein the processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread, wherein the processing threads are configurable, with the one or more hardware computing devices, to obtain contextual information corresponding to the database query;

generate the statistical information from the processing threads, wherein the one or more hardware computing devices are configurable to generate and update aggregated statistics based on the contextual information and the contextual information comprises app-specific contextual information, wherein the app-specific contextual information comprises one or more of: a tenant identifier (tenant ID), a user identifier (user ID), and a universal resource identifier (URI);

cause the statistical information to be stored in chunks of memory managed via a plurality of queues, wherein at least one queue corresponds to a completed queue of chunks and at least one queue corresponds to a processing queue of chunks, and further wherein the queue processing agent maintains at least an in-use list of chunks and at least a free list of chunks;

analyze the chunks of memory containing the statistics;

filter outlier statements based on the statistics; and

cause non-outlier statements to be stored by a physical storage device;

performing, with the one or more hardware processing devices, additional analysis on the outlier database query statements retrieved from the physical storage device prior to execution.

10. The non-transitory computer-readable medium of claim 9 wherein the database query statements comprise structured query language (SQL)-compliant database query statements.

11. The non-transitory computer-readable medium of claim 9 wherein the statistical information comprises one or more of: statement execution time, resources consumed.

12. A system comprising:

one or more hardware processing devices to execute one or more client threads and to execute one or more corresponding processing threads, wherein the processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread;

a queue processing agent communicatively coupled with the processing threads to receive the statistical information, to cause the statistical information to be stored in chunks of physical memory managed via a plurality of queues, wherein at least one queue corresponds to a completed queue of chunks and at least one queue corresponds to a processing queue of chunks, and further wherein the queue processing agent maintains at least an in-use list of chunks and at least a free list of chunks wherein the processing threads are further configurable to obtain contextual information corresponding to the database query;

a statistics agent communicatively coupled with the queue processing agent, the statistics agent to analyze the chunks of memory containing the statistics, wherein the statistics agent is configurable to generate and update aggregated statistics based on the contextual information and wherein the contextual information comprises database contextual information, the database contextual information comprises one or more of: a transaction identifier (transaction ID), a statement identifier (statement ID), a statement nest level, a plan identifier (plan ID), and bind variables;

a filtering agent communicatively coupled with the statistics agent, the filtering agent to filter outlier database query statements based on the statistics and to cause non-outlier database query statements to be stored by a physical storage device;

performing, with the one or more hardware processing devices, additional analysis on the outlier database query statements retrieved from the physical storage device prior to execution.

13. The system of claim 12 wherein the database query statements comprise structured query language (SQL)-compliant database query statements.

14. The system of claim 12 wherein the statistical information comprises one or more of: statement execution time, resources consumed.

15. A method for utilizing statistical information in a database environment, the method comprising:

executing one or more client threads with one or more hardware computing devices;

executing, with the one or more hardware computing devices, one or more processing threads corresponding to the one or more client threads, wherein the processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread, wherein the processing threads are configurable, with the one or more hardware computing devices, to obtain contextual information corresponding to the database query;

generating, with the one or more hardware computing devices, the statistical information from the processing threads, wherein the one or more hardware computing devices are configurable to generate and update aggregated statistics based on the contextual information and the contextual information comprises database contextual information, wherein the database contextual information comprises one or more of: a transaction identifier (transaction ID), a statement identifier (statement ID), a statement nest level, a plan identifier (plan ID), and bind variables;

causing, with the one or more hardware computing devices, the statistical information to be stored in chunks of memory managed via a plurality of queues, wherein at least one queue corresponds to a completed queue of chunks and at least one queue corresponds to a processing queue of chunks, and further wherein the queue processing agent maintains at least an in-use list of chunks and at least a free list of chunks;

analyzing the chunks of memory containing the statistics with the one or more hardware computing devices;

filtering, with the one or more hardware computing devices, outlier statements based on the statistics; and

causing, with the one or more hardware computing devices, non-outlier statements to be stored by a physical storage device;

performing, with the one or more hardware processing devices, additional analysis on the outlier database query statements retrieved from the physical storage device prior to execution.

16. The method of claim 15 wherein the database query statements comprise structured query language (SQL)-compliant database query statements.

17. The method of claim 15 wherein the statistical information comprises one or more of: statement execution time, resources consumed.

18. A non-transitory computer-readable medium having stored thereon sequences of instructions for utilizing statistical information in a database environment that, when executed by one or more processors, cause the one or more processors to:

execute one or more client threads;

execute one or more processing threads corresponding to the one or more client threads, wherein the processing threads are configurable to generate statistical information for each database query statement processed by the corresponding client thread, wherein the processing threads are configurable, with the one or more hardware computing devices, to obtain contextual information corresponding to the database query;

generate the statistical information from the processing threads, wherein the one or more hardware computing devices are configurable to generate and update aggregated statistics based on the contextual information and the contextual information comprises database contextual information, wherein the database contextual information comprises one or more of: a transaction identifier (transaction ID), a statement identifier (statement ID), a statement nest level, a plan identifier (plan ID), and bind variables;

cause the statistical information to be stored in chunks of memory managed via a plurality of queues, wherein at least one queue corresponds to a completed queue of chunks and at least one queue corresponds to a processing queue of chunks, and further wherein the queue processing agent maintains at least an in-use list of chunks and at least a free list of chunks;

analyze the chunks of memory containing the statistics;

filter outlier statements based on the statistics; and

cause non-outlier statements to be stored by a physical storage device;

performing, with the one or more hardware processing devices, additional analysis on the outlier database query statements retrieved from the physical storage device prior to execution.

19. The non-transitory computer-readable medium of claim 18 wherein the database query statements comprise structured query language (SQL)-compliant database query statements.

20. The non-transitory computer-readable medium of claim 18 wherein the statistical information comprises one or more of: statement execution time, resources consumed.

Assignments (2)
CHANGE OF NAME Recorded Nov 21, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069431/0012 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 11, 2016
From: WILDING, MARK
To: SALESFORCE.COM, INC.
Reel/Frame 039412/0303 →
Continuity (1)
Related Publication 20180046678A1 · Feb 15, 2018