Static query optimization
Abstract
Techniques and structures for tuning database queries. Actual statistics associated with data stored are retrieved from at least one memory device. The data is associated with one or more tenants of the multi-tenant database system. The actual statistics include at least one type of statistic maintained for the data. A subset of the actual statistics is selected based on a data trait targeted for optimization. A statistical value is calculated for each actual statistic from the subset of actual statistics across one or more tenants having the data trait targeted for optimization. An optimal query plan is determined based on the original query and the calculated statistical values.
Claims
exact text as granted — not AI-modified1 - 20 . (canceled)
21 . A method comprising:
retrieving actual statistics associated with data stored on at least one memory device having data associated with multiple tenants of multi-tenant database environment and the tenants have one or more data traits targeted for query optimization, wherein the actual statistics comprise actual statistical values associated with the one or more tenants; selecting a subset of the actual statistics; computing, with a query tuning and processing device, synthetic statistics for the one or more tenants based on the actual statistical values and the data traits for the tenants based on a predetermined value associated with the subset of the actual statistics and the predetermined value corresponds to an exemplary value based on a historical association of the one or more data traits with a selected tenant of the one or more tenants; and determining, by the query tuning and processing device, one or more query plans for optimally processing queries on behalf of the one or more tenants based for which the synthetic statics have been computed utilizing the synthetic statistics.
22 . The method of claim 21 wherein the synthetic statistics are further based on an average value associated with the subset of the actual statistics.
23 . The method of claim 22 wherein the average value comprises a predetermined value representing an exemplary value based on a data trait of an exemplary tenant of the one or more tenants.
24 . The method of claim 23 wherein the exemplary value is computed based on multiple values comprising a highest value associated with the exemplary tenant having the data trait targeted for optimization.
25 . The method of claim 24 wherein the multiple values further comprise a lowest value associated with the exemplary tenant having the data trait targeted for optimization.
26 . A non-transitory computer-readable medium having stored thereon instructions that, when executed by one or more processors coupled with a memory device, are configurable to cause the one or more processors to tune queries in a multi-tenant database environment, the one or more processors to:
retrieve actual statistics associated with data stored on at least one memory device having data associated with multiple tenants of multi-tenant database environment and the tenants have one or more data traits targeted for query optimization, wherein the actual statistics comprise actual statistical values associated with the one or more tenants; select a subset of the actual statistics; compute, with a query tuning and processing device, synthetic statistics for the one or more tenants based on the actual statistical values and the data traits for the tenants based on a predetermined value associated with the subset of the actual statistics and the predetermined value corresponds to an exemplary value based on a historical association of the one or more data traits with a selected tenant of the one or more tenants; and determine, by the query tuning and processing device, one or more query plans for optimally processing queries on behalf of the one or more tenants based for which the synthetic statics have been computed utilizing the synthetic statistics.
27 . The non-transitory computer-readable medium of claim 26 wherein the synthetic statistics are further based on an average value associated with the subset of the actual statistics.
28 . The non-transitory computer-readable medium of claim 27 wherein the average value comprises a predetermined value representing an exemplary value based on a data trait of an exemplary tenant of the one or more tenants.
29 . The non-transitory computer-readable medium of claim 28 wherein the exemplary value is computed based on multiple values comprising a highest value associated with the exemplary tenant having the data trait targeted for optimization.
30 . The non-transitory computer-readable medium of claim 29 wherein the multiple values further comprise a lowest value associated with the exemplary tenant having the data trait targeted for optimization.
31 . A system comprising:
a memory device; one or more hardware processors coupled with the memory device, the one or more hardware processors configurable to retrieve actual statistics associated with data stored on at least one memory device having data associated with multiple tenants of multi-tenant database environment and the tenants have one or more data traits targeted for query optimization, wherein the actual statistics comprise actual statistical values associated with the one or more tenants, to select a subset of the actual statistics, to compute, with a query tuning and processing device, synthetic statistics for the one or more tenants based on the actual statistical values and the data traits for the tenants based on a predetermined value associated with the subset of the actual statistics and the predetermined value corresponds to an exemplary value based on a historical association of the one or more data traits with a selected tenant of the one or more tenants, and to determine, by the query tuning and processing device, one or more query plans for optimally processing queries on behalf of the one or more tenants based for which the synthetic statics have been computed utilizing the synthetic statistics.
32 . The system of claim 31 wherein the synthetic statistics are further based on an average value associated with the subset of the actual statistics.
33 . The system of claim 32 wherein the average value comprises a predetermined value representing an exemplary value based on a data trait of an exemplary tenant of the one or more tenants.
34 . The system of claim 33 wherein the exemplary value is computed based on multiple values comprising a highest value associated with the exemplary tenant having the data trait targeted for optimization.
35 . The system of claim 34 wherein the multiple values further comprise a lowest value associated with the exemplary tenant having the data trait targeted for optimization.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.