Data imprinting techniques for use with data retrieval methods

By setting the size and boundary of bins and using workload-aware histogram and imprint bit slice technology, the problem of resource waste caused by false positive results and frequent values ​​in column imprint technology is solved, and the efficiency of query processing and resource utilization are improved.

CN113704300BActive Publication Date: 2024-08-27SAP SE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110539899.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-05-21
Filing Date
2021-05-18
Publication Date
2024-08-27
Estimated Expiration
2041-05-18

AI Technical Summary

Technical Problem

Existing column imprinting technology can easily lead to false positive results in query processing, resulting in inefficient use of computing resources, and frequently occurring values ​​will cause a large number of cache lines to be read, wasting resources.

Method used

Reduce the occurrence of false positive results by setting the size and bounds of bins, using workload-aware histograms to construct bins, retaining a bin for frequently occurring values, and using imprinted bit slices in bit vector construction to bin by bin rather than partition by partition. way to build bit vectors, reducing the amount of data passed to the cache.

Benefits of technology

It reduces the frequency of false positive results, improves the relevance of query processing, reduces the waste of CPU resources, and improves the utilization efficiency of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113704300B_ABST
    Figure CN113704300B_ABST
Patent Text Reader

Abstract

Techniques and solutions are described that can be used to determine a data subset of a data set that can respond to a query. In one aspect, a fingerprint is created for a data subset, wherein the fingerprint indicates, for a plurality of bins, whether the data subset includes a value within a corresponding bin. The bins are defined at least in part using data of a set for the query. In another aspect, at least one bin of the plurality of bins is designated as being associated with a value of the data set that satisfies a threshold frequency. In another aspect, a fingerprint is created for a plurality of bins, wherein the fingerprint indicates whether the plurality of data subsets include a value for a given bin. The query fingerprint can be compared to a data subset fingerprint or a bin fingerprint to determine a data subset that can respond to an associated query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to techniques for processing data, such as determining portions of a data set that may be relevant to a query. Certain implementations provide improved techniques for creating data imprints, where the data imprints may be compared to query imprints to determine whether the data having the data imprint may have information responsive to a query associated with the query imprint. Background Art

[0002] Software applications, especially enterprise-level software applications, often want to access huge amounts of data. Processing and storing such amounts of data can require a lot of computing resources and time. Some systems, such as SAP HANA from SAP SE in Walldorf, Germany, provide in-memory databases, where large amounts of data are kept in RAM. Although these in-memory databases can provide improved performance, data is typically transferred from memory to the CPU, such as to the CPU's cache, for processing.

[0003] When processing a query, data may be transferred from RAM to the CPU cache for processing, e.g., to determine whether the transferred data includes information responsive to the query. If the transferred data does not include data responsive to the query, the time and resources used to transfer the data from main memory to the cache and analyze the data with the CPU may result in an inefficient use of computing resources.

[0004] Column imprinting is a technique that has been used to try and facilitate query processing. Column imprinting can divide a data set into many smaller subsets. For example, the size of a subset can correspond to the size of a cache line of data passed from main memory to the CPU cache. The column imprints for each subset in the column can summarize the data present in the subset. The imprint can be in the form of a bit vector, where a given bit in the bit vector is set to 1 if there is a value within a specific value range within the subset, otherwise it has a zero value. A query can be represented as an imprint or in the form of a bit vector. The imprint of the query can be compared with the imprint of the subset to determine the subset that should be passed to the cache and further processed. However, current techniques using column imprinting may face various disadvantages, including if the bit vector comparison indicates that a subset may have data responsive to the query, but after further processing of the subset, it is determined that the subset does not contain data responsive to the query. Therefore, there is still room for improvement. Summary of the invention

[0005] This Summary is provided to introduce a selection of some concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0006] Techniques and solutions are described that can be used to determine a data subset of a data set that can respond to a query. In one aspect, a fingerprint is created for a data subset, wherein the fingerprint indicates, for a plurality of bins, whether the data subset includes a value within the corresponding bin. The bins are defined at least in part using data for a set of queries. In another aspect, at least one bin of the plurality of bins is designated as being associated with a value of the data set that satisfies a threshold frequency. In another aspect, a fingerprint is created for a plurality of bins, wherein the fingerprint indicates whether the plurality of data subsets include a value for a given bin. The query fingerprint can be compared to a data subset fingerprint or a bin fingerprint to determine a data subset that can respond to an associated query.

[0007] In one aspect, the present disclosure provides a method for defining an imprint of a data set using bins defined at least in part based on received queries for the data set. A plurality of first queries are received. Each query specifies a lower bound value and an upper bound value for a value type. A plurality of unique values ​​for the value type are determined. The data set is divided into a plurality of discrete subsets. A plurality of bins are defined at least in part based on the upper and lower bounds specified by the plurality of first queries. A given bin of the plurality of bins includes at least one unique value of the plurality of unique values. An imprint is defined for at least one discrete data subset of the plurality of data subsets. For each bin of the plurality of bins, the imprint identifies whether a unique value associated with the given bin is present in at least one discrete data subset.

[0008] In another aspect, the present disclosure provides a method for defining bins for a data set, wherein the bins are designated as being associated with values ​​exceeding a threshold frequency. A plurality of unique values ​​are determined for a value type in the data set. The data set is partitioned into a plurality of discrete data subsets. At least one unique value having a frequency that satisfies a threshold is determined. A plurality of bins are defined. A given bin in the plurality of bins includes at least one unique value in the plurality of unique values.

[0009] A first bin is designated as being associated with a unique value that satisfies a threshold. The first bin is associated with at least one unique value. At least for each unique value in the plurality of unique values ​​other than the at least one unique value, each unique value is associated with each bin in the plurality of bins other than the first bin. A signature is defined for at least one discrete data subset in the plurality of discrete data subsets. For each bin in the plurality of bins, the signature identifies whether a unique value associated with the given bin is present in the at least one discrete data subset.

[0010] In another aspect, the present disclosure provides a method for defining a bin fingerprint. A data set is divided into a plurality of data subsets. A plurality of unique values ​​in the data set are determined. A plurality of bins are defined. Each bin in the plurality of bins is associated with at least one unique value in the plurality of unique values. A bin fingerprint for the plurality of bins is defined. The bin fingerprint identifies whether a data subset in the plurality of data subsets includes a value associated with a corresponding bin.

[0011] The present disclosure also includes computing systems and tangible, non-transitory computer-readable storage media configured to perform the above-described methods or including instructions for performing the above-described methods.As described herein, various other features and advantages may be incorporated into the technology as desired. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a diagram showing how to use histograms to create an imprint for data subsets and queries of a dataset.

[0013] Figure 2A and 2B Pseudocode for the process of determining the bin boundaries of a histogram based on multiple queries of a data set is given.

[0014] Figures 3A-3F This shows how Figure 2A and 2B FIG. 5 is a diagram of a specific example of the process.

[0015] Figure 4 is a diagram that shows how the bins of a histogram can be defined to account for frequently occurring values ​​in a data set.

[0016] Figure 5 is a diagram showing how a footprint may be created for a bin of a histogram based on data of multiple data subsets.

[0017] Figure 6 is a block diagram of an example database environment in which the disclosed technology may be implemented.

[0018] Figure 7 is a flow chart of an example method for defining histogram bins based on an example workload.

[0019] Figure 8 is a flow chart of an example method for defining histogram bins to account for values ​​in a data set that meet a threshold frequency.

[0020] Fig. 9 is a flow chart of an example method for defining histogram bin footprints reflecting values ​​present in multiple data subsets of a data set.

[0021] Fig.10 is a diagram of an example computing system in which some described embodiments may be implemented.

[0022] Fig.11 is an example cloud computing environment that can be used in conjunction with the techniques described herein. DETAILED DESCRIPTION

[0023] Example 1 – Overview

[0024] Software applications, especially enterprise-level software applications, often want to access huge amounts of data. Processing and storing such amounts of data may require a lot of computing resources and time. Some systems, such as SAPHANA of SAPSE in Waldorf, Germany, provide in-memory databases, in which large amounts of data are kept in RAM. Although these in-memory databases can provide improved performance, data is often transferred from memory to the CPU, such as to the CPU's cache, for processing. Therefore, it may be beneficial to limit the data transferred to the cache to the data that actually contains the response to the query.

[0025] When processing a query, data may be transferred from RAM to the CPU cache for processing, e.g., to determine whether the transferred data includes information responsive to the query. If the transferred data does not include data responsive to the query, the time and resources used to transfer the data from main memory to the cache and analyze the data with the CPU may result in an inefficient use of computing resources.

[0026] In order to determine the query results, column imprinting has been proposed as a way to reduce the amount of data read. In particular, a data set (which may be a subset of a larger data set), such as a column of a table, can be read in discrete units. The discrete unit may correspond to the size of a data transfer unit (which may be referred to as a "cache line") used to transfer data between the main memory and the processor cache. In the column imprinting technique, the values ​​present in the column are grouped into bins or buckets. For a column with n bins, a bit vector of length n can be used to indicate whether a given cache line of data contains a value corresponding to a particular bin. Assuming that a column has m cache lines, m bit vectors of length n, respectively, can be used to represent the data in the column. If a data row or other partition of the data includes a value corresponding to the associated bin, the n bits in the bit vector may be set to 1, otherwise set to 0 or remain at 0.

[0027] Queries such as range queries can also be converted into footprints (in the form of bit vectors of length n), which can be compared with column footprints to determine whether the values requested by the query are likely to be present in the cache lines of the data represented by the column footprint. A range query can include a query that requests data between two endpoint values, such as a query that looks for values greater than and less than or equal to a given value. An example range query can be 2 < x ≤ 6, where x represents the value that satisfies the query condition. Comparing the bit vectors can quickly determine whether the cache line corresponding to a particular column footprint should be loaded into the cache. A logical AND (AND) operation can be performed between the bit vector for the column footprint and the bit vector for the query. If there is a bit value of 1 in the result, the value of interest to the query may be present in the cache line of the data, so the actual cache line of the data should be passed to the processor cache for further processing.

[0028] Thus, using column footprints helps reduce data transfer between main memory and the processor cache and reduces CPU usage because data that clearly does not satisfy the query is not passed to the cache and processed. However, typical column footprint techniques result in "false positives". Because a bin represents multiple values and if any of these multiple values are present in the cache line of the data, the column footprint has a bit set to 1, it is possible that the cache line may be marked as potentially having the data required by the query, but when the entire cache line of the data is processed, it is determined that the value that caused the bit to be set to 1 is not the value requested by the query. Thus, false positive scenarios waste computer resources.

[0029] According to one aspect, the present disclosure provides techniques for providing improved column footprints by setting the size or boundaries of bins for bit vector construction to reduce the chance of encountering false positives. The techniques can analyze actual or hypothetical queries to determine the values requested by the query, including the endpoints specified by the query. Given a specified number of bins, the present disclosure provides techniques for determining the values to place in the bins and the size of the bins. Thus, the techniques can help provide a stronger correlation between the expected workload and the column footprints used to process the workload, which can reduce the frequency of false positives and thus more efficiently utilize computing resources.

[0030] The false positive rate can also be increased by specific values that occur frequently in a data set (e.g., a column). Since even a single result bit vector with a bit set to 1 causes the entire cache line of data to be read, frequently occurring values cause many cache lines to be read. Even if the cache line does include the value of interest and thus the result is not technically a false positive, the column footprint technique may still not provide a significant reduction in the number of cache lines read.

[0031] According to another aspect of the present disclosure, bins used in the construction of bit vectors for cache lines and queries are constructed taking into account frequently occurring values. In a particular implementation, a bin may be reserved for frequently occurring values. For example, suppose a user wishes to create an 8-bit bit vector, so 8 bins are used. Seven bins will be set using another technique or other criteria, and the eighth bin will be used to indicate that a cache line includes a frequently occurring value.

[0032] Assuming that frequently occurring values ​​are requested, the logical AND operation may still result in many cache lines being read. However, assuming that queries do not request frequently occurring values, the column imprint is more likely to identify the column imprint as not containing the value of interest. Assume that the value 4 occurs frequently. A bin containing the values ​​1-4 may result in a query requesting the values ​​1-3 reading all cache lines where the value 4 occurs, even if the value requested by the query is not 4. Including 4 as a frequently occurring value may result in a new bin definition that includes the values ​​1-5. If a cache line includes the value 4, the bit indicating the bin for the frequently occurring value may be set to 1.

[0033] The bit vector for a query can be constructed in a similar manner. A query requesting the value 3 will not result in the frequently occurring value bit being set, but a query requesting the value 4 will result in the frequently occurring value bit being set. If the frequently occurring value bit is set for the query, only the frequently occurring value bit of the column stamp needs to be checked.

[0034] According to another aspect, the present disclosure provides techniques that can be used to reduce the data passed to the cache when comparing a column imprint with a query imprint and to speed up the identification of column imprints that match the query criteria. Typically, a logical AND operation is performed between the query imprint and each column imprint. Assuming that the column has 1000 column imprints, 1000 comparison operations will be required and the bit vectors of the 1000 column imprints will need to be loaded into the cache.

[0035] The present disclosure provides for bit vectors to be constructed on a bin-by-bin basis rather than a partition-by-partition basis for partitions or subsets of a data set (e.g., columns). These bin-based bit vectors may also be referred to as imprint bit slices. Imprint bit slices are formed by creating an imprint bit slice bit vector for each bit position of a column imprint bit vector, where the length of the imprint bit slice vector is equal to the number of column imprints (or partitions), and the number of imprint bit slices is equal to the number of bins. Typically, the number of column imprints is greater than the number of bins in the column imprint.

[0036] The query can be evaluated by performing a logical OR operation between the imprint bit slice bit vectors corresponding to the bits set to 1 in the query imprint. The bit vector resulting from the OR operation indicates that the cache line to which it corresponds should be passed to the CPU cache and the imprint of the column processed. In particular, the technique can reduce the number of bit vectors read and processed by the CPU when using the column imprint technique. The technique can also provide compression, or greater compression than other techniques, and can allow the creation of multiple bins that are independent of the cache line size of a particular CPU architecture.

[0037] The above techniques can be used alone or in combination. Workload-aware bin definitions can be used with or without bins representing frequent values ​​or imprint bit slices. The use of bins representing frequent values ​​can be used with or without imprint bit slices. Imprint bit slices can be used alone or in combination with either or both of workload-aware bin definitions or bins representing frequently occurring values.

[0038] Example 2 – Example Column Imprint

[0039] Figure 1 It is shown how to create a data imprint for a data set or a subset thereof, wherein the data imprint summarizes the data present in the data set, and how to use these data imprints to retrieve or determine the data present in the data set when processing a request. In this Example 2 and subsequent examples, the disclosed technology is described in the context of data corresponding to data columns maintained in a column storage format (i.e., for multiple rows of columns, the data of a table is stored on a column-by-column basis, rather than maintaining data on a row-by-row basis as in a row storage format).

[0040] Figure 1 A data column 110 is shown that includes a plurality of positions, elements, or indices 114. Each position 114 can be associated with a value 118. In some cases, one or more positions 114 have no value, or have a value (e.g., null) indicating that no particular value is assigned to a given position. Values ​​118 can be actual data values ​​of column 110, or can be value IDs resulting from compressing the data in the column (e.g., using dictionary compression).

[0041] Column 110 is shown with positions 114 organized into subsets 122 (shown as 122a-122d). Subsets 122 may be selected so that they have a fixed size, although the fixed size may vary depending on the implementation. For example, the size may be selected to match the size of a cache line of a particular computing system—the size of data transferred between a main memory such as RAM (or other storage device) and a cache of a processing unit (e.g., a CPU cache or a cache associated with a particular processing core of a CPU).

[0042] A subset 122 (or in some cases, an entire column 110 of values ​​118) may be represented as a stamp. A stamp may be defined based on a range of values ​​present in the column 110. Typically, a stamp size is defined, where the stamp size defines the length of the bit vector of the column stamp. The values ​​118 in the column may be subdivided into a number of bins or buckets corresponding to the length of the bit vector.

[0043] For example, column 110 is shown as having values ​​between 0 and 9. Assuming a bit vector of length 4 is desired, values ​​118 may be divided into 4 groups. In some cases, the bins are of equal size (e.g., each bin contains the same number of values ​​118), while in other cases, the bins may be of different sizes. Typically, the values ​​within a bin are consecutive, but in other cases, the values ​​in a given bin need not be consecutive, but may be selected based on other criteria.

[0044] Table 126 shows a histogram of values ​​118, where the values ​​have been distributed into four buckets (or bins, these terms may be used interchangeably in this disclosure) 130a-130d, as shown. Table 134 shows a fingerprint 138 (shown as 138a-138d) that may be created for subset 122 using table 126. A fingerprint 138 is a bit vector in which each bit represents a bucket 130. For example, bit 142a corresponds to bucket 130a, bit 142b corresponds to bucket 130b, and so on. When a fingerprint 138 is being defined, if a value 118 falls within the value range defined for bucket 130, then the corresponding bit 142 of the fingerprint is set to 1, otherwise it remains at 0. For subset 122a, the subset has a value 118a of 0, so bit 142a of fingerprint 138a is set to 1. Subset 122a does not include values ​​within the range of buckets 130b, 130c, so bits 142b, 142c of sigil 138a are set to (or remain at) 0. Subset 122a includes value 118b of 9, which is within the range of bucket 130d, so bit 142d of sigil 138a is set to 1.

[0045] The fingerprints 138 of the table 134 may be created for the query in a manner similar to the way the histogram of the table 126 is used to create the fingerprints 138. The table 150 provides the fingerprints 154 (shown as 154a-154d) for the query 158 (shown as 158a-158d) in the form of a bit vector. Like the column fingerprints 138, the bit vector of the query fingerprint has a length corresponding to the number of buckets 130 in the histogram of the table 126. If the value 118 in a particular bucket 130 will be responsive to the query, the corresponding bit in the query fingerprint 154 is set to 1, otherwise it is zero.

[0046] Take query 158a, which requests values ​​greater than 2 and less than or equal to 5. Therefore, the values ​​118 in buckets 130b, 130c will respond to query 158a, but the values ​​in buckets 130a, 130d will not. Therefore, the query imprint 154a for query 158a is 0110.

[0047] As described above, by evaluating the result of the logical AND operation between the column imprint 138 and the query imprint 154, it can be determined whether the column imprint 138 can have a value responsive to the query. Take the query imprint 158a and the column imprint 138a as an example. The logical AND operation is shown in Table 160. All bits of the result column 162 are set to 0, indicating that the subset 122a of the column 110 does not have a value responsive to the query 158a.

[0048] Table 170 represents a logical AND operation between query fingerprint 154a and column fingerprint 138b for subset 122b of columns 110. Result column 172 has two bits set to 1, indicating that subset 122b may contain values ​​responsive to query 158a. Therefore, based on this analysis, it may be determined that the data for subset 122a does not need to be further analyzed, but the data for subset 122b should be further analyzed.

[0049] Example 3 – Example technique for defining histogram bins and column markers based on an example workload

[0050] As discussed in Example 1, the technique described in Example 2 using column stamps to evaluate the subset of data that should be analyzed in response to a search predicate can be beneficial, but this benefit can diminish as the number of false positive results increases. The present disclosure provides for defining bucket boundaries in a manner that better represents the types of queries being made against a data set.

[0051] For example, consider a data column representing sales information, with a particular data column representing the state in which the sales were made. It is possible that some states (e.g., large states like California) may be more commonly searched than other states (e.g., smaller states or states with less populations, such as Rhode Island or North Dakota). Or, there may be groups of states that tend to be requested in common queries (e.g., West Coast states versus East Coast states). Defining histogram buckets that better reflect the search parameters makes it more likely that the buckets associated with positive results when performing a logical AND operation will actually contain the values ​​requested by the query, thereby reducing the occurrence of false positives and reducing data transfers, cache usage, and CPU processing time used to execute the query.

[0052] The disclosed technology may be referred to as "workload-aware histograms" because the histograms are built based on the workload. The workload may be a predicted or simulated workload, or may be an actual workload, such as by tracking queries performed over a period of time. Note that different histograms may be used for different queries / use cases, even with the same data. For example, different histograms may be used with different software applications, different users, etc., based on the predicted or observed workload of the application or user. Thus, histograms may be customized to provide better performance for different types of workloads.

[0053] Figure 2A and 2B Pseudo code for an example process 200 for defining buckets based on workload is shown. Process 200 uses one or more (usually multiple) queries, the number of buckets in which you want to place values, the values ​​in the data set divided into buckets, and the weight of each value as input. Various criteria can be used to determine the weights, such as the number of queries requesting the value, the number of times the value appears in the data set, a user-provided weighted value, other values, or a combination of two or more of these types of weights.

[0054] Process 200 is typically performed by determining, for each value in the domain (the sum of unique values ​​of each value in the data set) of a data set that serves as an endpoint for at least one query (or, at least for values ​​other than the first or last value in the set of values ​​that serve as an endpoint), the cost of placing a left bin boundary at the endpoint value (routine 210) and the cost of placing a right bin boundary at the endpoint value (routine 220). For each endpoint value, routine 230 calculates the total cost of placing a bin boundary at the given endpoint value. Routine 240 selects the endpoint value with the lowest total cost as the bin boundary. The selected endpoint value is indicated as the bin boundary, and the indication is taken into account when selecting other bin boundaries. Process 200 is repeated until a total number of bins have been defined.

[0055] Process 200 Figures 3A-3F is further shown in the figure. Figure 3AA data set 304 is shown, which can represent a data column in a database. The data set 304 has multiple values ​​308, which are selected or constrained to specific values ​​(e.g., the domain of the data set). The number of unique values ​​in the data set 304 (or in the domain of the data set) can be referred to as the cardinality of the data set. Although the values ​​are shown as integers, the values ​​can be other types of data, including data types used by the computing system. The data type can be a primitive data type, or it can be an instance of an abstract or composite data type. In a specific example, the value 308 can be an integer, but it can also be a value ID representing other data, which can also be an integer or can be other types of data, such as a character array, a string, etc. For example, the value "0" can represent a specific country, state, product, etc. with a number, a string, etc. The value can be assigned during dictionary compression of the data set, the data set 304 is created from the data set, and the data set 304 corresponds to the data set in other ways.

[0056] In some cases, the data used in a dataset is restricted to set values. For example, there are a set number of states in the United States, and each state can be represented by a value ID. However, value IDs can also be assigned to values ​​that are not restricted to a set value. When a new value is provided to an uncompressed dataset, it can be assigned a value ID in a dictionary that maps values ​​to value IDs.

[0057] exist Figure 3A In the specific example of FIG. 304 , data set 304 includes 11 unique values, 0-10. Table 312 assigns a weight 316 to each value 308. Weight 316 can be determined in a variety of ways, including based on the number of times value 308 appears in data set 304. As shown, it is determined that value ID 308a (value 0) appears five times in data set 304, and is assigned a weight 316a of 5 (note that for ease of presentation, the weights are not shown in Table 312 ). Figure 3A Only a portion of data set 304 is shown).

[0058] Figure 3AA plurality of range queries 320 are shown that have been previously submitted to a data storage device (e.g., a relational database management system) that includes a data set 304. Round brackets indicate that an endpoint (e.g., a minimum value of a range or a maximum value of a range) should not be included in the query results, and square brackets indicate that an endpoint should be included in the query results. Thus, for example, query 320a requests a value greater than zero and less than or equal to four. Note that a query such as query 320b may include an endpoint that is not a value 308 in the data set 304. In some cases, such as for query 320b, a particular value such as -1 may indicate that the lowest value in the data set 304 should be included in the query results, which is useful in situations where it is not permitted to have a minimum value specified using a greater than or equal to operator (e.g., square brackets are not available for lower bounds of queries). The present disclosure uses the term left endpoint to refer to the minimum value (or the minimum value that the query must be greater than) of a query 320 (e.g., 0 for query 320a), and the right endpoint to refer to the maximum value in the query 320 (e.g., 4 for query 320a).

[0059] Table 324 shows one way to indicate what queries 320 use a particular value 308 (or value ID) as an endpoint. Row 326a lists the value 308. Row 326b provides a value, such as a Boolean value (e.g., using 0 for false and 1 for true) to indicate whether a given value 308 in row 326a is used as an endpoint, either a left endpoint or a right endpoint, in any query in the set of queries being analyzed (and summarized in Table 324). Row 326c indicates the number of queries for which a given value 308 in row 326a is used as a left endpoint, and row 326d indicates the number of queries for which a given value is used as a right endpoint. Considering value 308a, it can be seen that value 0 is an endpoint for a query and is used as a left endpoint in two queries, but not as a right endpoint for any query.

[0060] Steering Figure 3B , table 330 has rows 332a, 332b corresponding to rows 326b and 326a of table 324. Table 334 has row 336a corresponding to row 326a and row 336b providing weights for given values ​​in row 336a.

[0061] Table 338 shows one way of representing how histogram buckets are defined for discrete values ​​308 of data set 304, including row 340d with associated discrete values ​​308 provided. Row 340c corresponds to the value weights in row 336b of table 334. Row 340a indicates whether a given value in row 340d is used as an endpoint of a histogram bucket, with a value of 1 indicating that the value is an endpoint and a value of 0 indicating that the value is not an endpoint. Row 340b shows the weights of gaps, where a gap is a collection of value IDs between endpoints and is calculated as the weight of the value 308 in row 340c within a given gap (or histogram bucket). Thus, according to row 340b, the first gap g oincludes value 3080-3, and corresponding to the first bucket, the second gap / bucket includes only value 4, the third gap / bucket includes values ​​5-8, and the fourth gap / bucket includes values ​​9 and 10. Note that the buckets defined by the histogram represented by table 338 are not of equal size, and therefore there are not an equal number of values ​​308 between each bucket endpoint (e.g., the gap sizes are not equal).

[0062] In process 200 , values ​​used as endpoints are evaluated 308 for defining histogram buckets. Figure 3C Table 324 is included, and table 344 that can be constructed using information from table 324 is also shown. Table 344 includes row 346a, which assigns consecutive endpoint numbers to each value 308 in row 346b, where the values ​​in row 346b are only those values ​​that are used as endpoints for at least one query. Note that the value -1 is included in row 326a of table 324, but not in row 346b because it does not correspond to value 308. Rows 346c, 346d indicate the number of queries for which a given value of row 346b is used as a left endpoint or a right endpoint, respectively. Row 346e provides a Boolean value that indicates whether a given endpoint of row 346a is currently (1) or not (0) used as a bin boundary.

[0063] The endpoint in row 346a of table 344 may be defined (shown in endpoint definition 354) as including the information in other rows 346b-346e of table 344. An endpoint may be defined as an instance of an abstract or composite data type that includes the information in rows 346b-346e as the value of a data member of such abstract or composite data type. Using this representation, table 344 may be represented as table 348, which includes a single row 350 of endpoint identifiers.

[0064] Figure 3D-3F A specific example of how process 200 may be implemented is shown. Figure 3D and 3E Routine 210 for determining the left cost for a single bin placement step is described in detail. The process for determining additional costs for subsequent iterations and for determining the right cost using routine 220 may be performed in a similar manner. Figure 3F It is shown how the left and right costs determined using routines 210 , 220 are used to assign values ​​308 as bin boundaries.

[0065] Figure 3D A table 356 is shown summarizing the endpoint information used in executing routine 210 (and will also be used in executing routine 220, although this process is not described in detail). Table 356 includes a row 358a summarizing the weights of the gaps between endpoints 360. Figure 3BThe table 338 of 356 calculates the weights as discussed. The table 356 also includes a row 358b containing a value (e.g., a value ID) associated with a given endpoint 360, rows 358c, 358d providing the number of queries for which the endpoint 360 is used as a left endpoint or a right endpoint, respectively, and a row 358e providing a Boolean value indicating whether the given endpoint 360 is currently set as a bucket (or bin) boundary. Rows 358b-358e may be similar to Figure 3C 346a-346e of table 344. Note that the values ​​in table 356 used in the detailed example of executing routine 210 are different from the values ​​in table 344.

[0066] Tables 364a-364f illustrate the iterations in routine 210 that determine the left cost, which will be combined with the right cost to produce a total cost, which will then be used to assign a bin boundary to one of the endpoints 360. The value of row 358e is then updated to reflect that the selected endpoint 360 is a bin boundary. Process 200 can then be repeated until the desired number of bin boundaries have been placed.

[0067] Each table 364 includes an identifier of an endpoint 360, a row 366a identifying the gaps between adjacent endpoints, and a row 366b, which is an array or vector for tracking the weights of the corresponding endpoints 360 in row 366a. Indicator 368a (asterisk) indicates the current endpoint 360 being evaluated. Indicators 368b, 368c (bars) indicate the endpoint 360 used to calculate the tRight variable (row 234) of the routine 210 and the gap 370 used to calculate the tWeight variable (row 232) of the routine 210, respectively. As described at row 236, if the endpoint 360 being evaluated has a value of 1 (true) in row 358e indicating whether the endpoint is currently marked as a bin boundary, tRight and tWeight are reset to zero.

[0068] Each table 364 is associated with a respective calculation 374 (shown as 347a-374f) that shows how steps 238-250 are performed for each endpoint 360. Starting with table 364a and calculation 374a, routine 210 begins by evaluating the first endpoint 360, endpoint e0. Since tRight and tWeight are initially zero, rows 238 and 240 indicate that these variables do not result in an increase in the Cost variable, which remains at zero. Evaluating row 242, the gap weight g0 17 for the gap is added to tWeight, which assigns a value of 17 to tWeight. Using row 244, the number of queries for which e0 is the right endpoint, 1, is added to tRight, assigning a value of 1 to tRight. Evaluating row 246, isBin? for e0 is 0, so row 246 does not indicate any action that should be taken. The left bin cost for e0 is set to the current value of Cost, 0, making the left bin cost for e0 = 0. Routine 210 then indicates that steps 238-250 should be performed for the next endpoint e1.

[0069] Turning to table 364b and calculation 374b, according to row 238, the current value of Cost (0) is added to the current value of tRight (1) multiplied by the gap weight g1 (5) to provide an updated Cost value of 5. According to row 240, an updated Cost is determined by adding the current Cost value of 5 to the product of the left endpoint quantity 2 of the previous endpoint (e0) and the current value of tWeight of 17 to provide an updated Cost of 39. According to row 242, an updated value of tWeight is determined by adding the current value of tWeight of 17 to the gap weight g1 5 to provide an updated value of 22. Then, according to row 244, the value of tRight is updated by adding the current value of tRight of 1 to the query quantity 3 for which e1 is used as the right endpoint, and the updated tRight value is 4. Since e1 is not currently designated as a bin, line 246 indicates that no action should be taken, line 248 indicates that the left bin cost of endpoint e1 is the current Cost value of 39, and routine 210 is then repeated for the next endpoint e2.

[0070] Turning next to table 364c and calculation 374c, indicators 368b, 368c indicate that the left bin cost of e2 is affected by the costs of g0 and g1 as well as the costs associated with e0 and e1. These costs, included in tRight and tWeight, continue to increase as additional gaps and endpoints are evaluated without endpoints being designated as bin boundaries.

[0071] According to line 238, the value of Cost is updated by adding the product of the gap weight g2 10 and the current value of tRight 4 to the current Cost 39 to provide an updated Cost of 79. Then, according to line 240, Cost is increased by adding the product of tWeight 22 and the number of left endpoints associated with endpoint e1 2 to the current value of Cost to provide an updated Cost of 12. According to line 242, the value of tWeight is updated by adding the gap weight g2 10 to the current value of tWeight 22 to provide an updated tWeight value of 32. According to line 244, the value of tRight is updated by adding the number of right endpoints of e2 5 to the current value of tRight 4 to provide an updated tRight value of 9. Since e2 is not currently designated as a bin boundary, line 246 indicates that no action should be taken, line 248 indicates that the current value of cost 123 should be assigned as the left cost of endpoint e2, and the routine 210 continues by evaluating e3.

[0072] Now go to Figure 3E , according to line 238, Cost is updated by adding the current value of Cost, 123, to the product of tRight (9) and the gap weight g314 to provide an updated cost of 249. Then, line 240 indicates that Cost should be updated by adding the current value of Cost, 249, to the product of the number of left endpoints of e2, 0, and tWeight, 32, which leaves Cost at 249. According to lines 242 and 244, the values ​​of tWeight and tRight are updated to 46 and 15, respectively. In this case, line 246 evaluates to true because e3 is currently designated as the bin boundary. Therefore, tWeight and tRight are both reset to 0. According to line 248, the current Cost 249 is designated as the left cost of g3.

[0073] Routine 210 then proceeds to evaluate e4 and e5 in a manner similar to the above process, as shown and described with respect to tables 364e, 364f and calculations 374e, 374f. After evaluating all endpoints, the left bin cost for each endpoint 360 is shown in table 378.

[0074] Routine 220 may be performed in a manner similar to routine 210 described above. Figure 3FTable 384 is shown, which lists the left bin cost 386a, right bin cost 386b, and total cost 386c for each of the endpoints 360. As can be seen from Table 384, endpoint e1 has the lowest total cost. Therefore, endpoint e1 can be identified as a bin boundary, and its isBin? value in row 358e can be updated to 1. Assuming four bins or buckets are desired, routines 210, 220 will be executed additional times to determine a third bin boundary in addition to e1 and e3. The three bin boundaries, along with the natural boundaries provided by the first and last values ​​of the unique value set in the data set, provide a total of four bins.

[0075] Example 4 – Example histogram bin definition illustrating values ​​in a dataset that meet a threshold frequency

[0076] As described in Example 1, using column stamping can be problematic when a column contains one or more frequently occurring values. Because it is likely that the frequently occurring values ​​appear in multiple column data segments, column stamping of those segments is less likely to provide negative results, which means that a greater number of column data segments will be read. Even if those column data segments include the values ​​of interest, column stamping does not reduce the number of column segments passed and processed to the desired degree.

[0077] This Example 4 describes a technique that can be used to adjust the definition of buckets in a histogram to account for frequently occurring values, which can make the column stamp more useful for queries that do not request frequently occurring values. The technique of this Example 4 can be used with other techniques described in this disclosure, including the technique for workload-based bucket boundary definition described in Example 3. However, the technique of this Example 4 can be used in other scenarios, including cases where buckets are defined in different ways, including when the buckets are evenly distributed for values ​​that appear in the data set (e.g., a set of 40 values ​​is divided into 0-9, 10-19, 20-29, and 30-39).

[0078] Figure 4 A data column 404 is shown with a plurality of values ​​408. The values ​​408 include a set of discrete values, where a given discrete value can appear multiple times in the data column. The number of discrete values ​​408 in the data column 404 can be referred to as the cardinality of the column. In the data shown, the unique values ​​are 1-15.

[0079] In the column stamping technique, unique values ​​can be used to define the range of buckets in the histogram, including by evenly distributing unique values ​​among the buckets, using a workload-aware technique such as described in Example 3, or using some other method. For illustration purposes, Figure 4A table 412 is shown that includes four buckets 416 (shown as 416a-416d) and definitions 418 (shown as 418a-418d) of values ​​408 associated with a given bucket. Buckets 416a-416c each include four unique values, while bucket 416d includes three unique values. Thus, it can be seen that buckets 416 can differ in the number of unique values ​​associated with the buckets. In table 412, buckets 416 are defined using continuous values. However, buckets 416 can be defined with one or more (including all) discontinuous values.

[0080] For purposes of this Example 4, it is assumed that the data column 404 is to be read in units of seven values ​​408 (e.g., if the cache line size is equal to seven). This criterion produces data subsets 420a-420c, which in turn can be associated with corresponding bit vectors 428a-428c in table 424. The bit vector 428 can be constructed as explained in Examples 1-3. Since the histogram includes four buckets 416, the bit vector 428 includes four bits.

[0081] According to this example 4, bucket 416 can be redefined to account for values ​​408 having specific characteristics (e.g., frequently occurring). However, other criteria can be used to determine the criteria for one or more values ​​408 to be included in bucket 426, using criteria other than the criteria used to determine the values ​​408 to be included in other buckets (e.g., based on a fixed number of values ​​per bucket, using a workload criterion to define bucket boundaries between consecutive unique values, etc.).

[0082] For the purpose of this discussion, a bucket that uses criteria different from those used for other buckets to select one or more of its members is referred to as a target bucket, and the selection criteria may be referred to as a target selection criteria. The value to be placed in the target bucket may be selected manually (e.g., based on user input), or may be selected based on specific rules or other target selection criteria. For example, a value 408 that appears a threshold number of times in a data column 404 may be automatically selected for the target bucket. Alternatively, a value 408 requested in at least a threshold number of queries may be included in the target bucket. Other target selection criteria may be used without departing from the scope of the present disclosure.

[0083] For a specified number of buckets, one bucket is designated as the target bucket, and other buckets can be defined based on other criteria. Figure 4 In the example of , assuming four buckets are expected, one bucket can be designated as the target bucket, and the unique values ​​can be distributed among the other buckets. This process can be equivalent to converting bucket 416d into a target bucket and distributing unique values ​​among buckets 416a-416c.

[0084] The result of this process is shown in table 440, which has buckets 444a-444d and associated values ​​408 / value ranges 446a-446d. Bucket 444d is the target bucket, in this case reserved for frequently occurring values. If "4" is determined to be a single frequently occurring value, it is placed in bucket 444d. The remaining buckets 444a-444c contain other values ​​408 and are defined according to other criteria (e.g., uniform distribution, use of workload to define bucket boundaries, etc.). Note that value range 448a for bucket 444a with range 1-5 includes the value 4, even though 4 is also assigned to bucket 444d. In the bit vector, the bit corresponding to bucket 444d can be referred to as a skip bit because evaluation of the skip bit can avoid further evaluation of the query imprint (i.e., if both the query and data subset imprints have their skip bits set to 1).

[0085] The imprints in the form of bit vectors 452a-452d and skip bit values ​​454a-454d shown in Table 450 can be constructed for data subsets 420a-420c. When setting the bits in bit vector 452, if the data subset includes a frequently occurring value, in this case 4, the fourth bit corresponding to bucket 444d (the target bucket) is set to 1. If so, the remaining bits of buckets 444a-444c are set assuming that the frequently occurring value has been eliminated from the data subset. For example, assume that a data subset, such as data subset 420a, includes values ​​2 and 4. The value 4 will cause the fourth bit to be set to 1, and the value 2 will cause the first bit to be set to 1, as shown in bit vector 452a. Taking a data subset (such as data subset 420c) that only includes the value 4 and no values ​​in the range 1-5 as an example, the fourth bit will be set to 1, but the first bit will remain at 0, as in bit vector 452c.

[0086] The bit vector for the query can be constructed in a manner similar to that described for bit vector 452. Query 462 in table 460 requests values ​​between 0 and 2. Because query 462 does not request the frequent value 4, its skip bit 466 is set to 0. Based on the definition of buckets 444a-444c, the imprint of the query is 100. When evaluating query 462, since skip bit 466 is not 1, there is no need to evaluate the skip bits 454a-454c of data subsets 420a-420c. A logical AND operation can be performed between bit vectors 452a-452c and bit vector 464. The evaluation indicates that data subset 420c can be skipped / not transferred to the cache / not evaluated.

[0087] Example 5 – Example Histogram Bin Imprints Defined for Multiple Data Subsets

[0088] As described in Examples 1-4, bit vectors for column or query fingerprints are typically stored on a partition-by-partition basis (e.g., for each data subset of a column, where a data subset may correspond to a cache line of data), where the bit vector is equal in length to the number of buckets in the histogram used to construct the bit vector. The process of evaluating the data subsets that may be responsive to a query typically involves performing a logical AND operation on the fingerprint of each data subset and the query fingerprint. This approach may have some disadvantages.

[0089] For selective queries, there may be only a limited number of data subsets that include data that is responsive to the query. Therefore, AND operations and evaluations may be performed on many data subsets that are not responsive to the query. In addition, the size of the buckets used for the histogram is often closely related to the cache line size of the specific CPU architecture, which may limit the number of buckets that can be created and may result in more limited selectivity than if more buckets were created. In addition, constructing the bit vector on a partition-by-partition basis limits the application of compression techniques that may otherwise be used. This Example 5 provides techniques that can address these issues.

[0090] In particular, this Example 5 provides for creating bit vectors for buckets of a histogram on a bucket-by-bucket basis, where the length of such bit vectors may be equal to the number of data subsets. Figure 5 This process is shown. Table 510 includes columns 512 and 514, where the value of column 512 represents a data subset or partition of a data set (e.g., a column), and column 514 provides an imprint of the data subset in the form of a bit vector. The length of the bit vector is 8, corresponding to a histogram defined based on eight buckets.

[0091] The technique of this Example 5 can be visualized as rotating the stamp 514 to provide a table 520. The table 520 includes a column 522 whose values ​​correspond to a particular position in the bit vector 514. The table 520 includes a column 524 whose values ​​correspond to the values ​​of the partition 512 at each bit position in the stamp 514. It can be seen that the length of the stamp in column 524 is 16 bits, which corresponds to the number of partitions in the table 510. Therefore, each row 530 of the table 520 summarizes the values ​​of the partition 512 for a particular bucket in the histogram. The stamps in column 524 can be referred to as stamp bit slices because they represent a slice of the data subset 512 at a given bit position of the stamp 514.

[0092] Imprint 540 may be created for a query using a representation similar to imprint 514, where a bit is set to 1 for each bucket that contains the value requested by the query (where the query may or may not be a range query). In imprint 540, bits with a value of 1 correspond to buckets that may have the value requested by the query, and bits with a value of 0 correspond to buckets that do not have the value requested by the query. Thus, when evaluating a subset of data that may be responsive to a query, the investigation may be focused on buckets that may have values ​​responsive to the query, while other buckets may be ignored. Thus, in the case of imprint 540, the second and eighth bits are set to 1. Thus, the bit vectors or imprint bit slices in table 520 corresponding to the second and eighth buckets (rows 530a, 530b) are relevant, while the remaining rows are irrelevant to the query.

[0093] A logical OR operation may be performed between the stamps of rows 530a, 530b to provide a bit vector corresponding to partitions that may have data responsive to the query. In this example, the result of the OR operation is 0100101001001001, indicating that only 6 of the 16 partitions need to be passed and further evaluated to determine whether they include data responsive to the query. Although the same result can be obtained using the stamp in the form of table 510, it is advantageous to use the stamp bit slice of 520 because only two OR operations need to be performed to identify six potentially relevant partitions, rather than performing sixteen AND operations. In addition, since the length of stamp 524 does not need to correspond to the cache size of the CPU architecture, a greater number of buckets may be used if desired. Finally, note that stamp bit slice 524 typically includes a long run (in this case, the value is 0). Therefore, bit slice 524 may be more suitable for compression, such as using run length encoding, than stamp 514.

[0094] Example 6 – Sample database environment

[0095] Figure 6 An example database environment 600 is shown in which the disclosed technology can be implemented. Database environment 600 can include client 604. Although a single client 604 is shown, client 604 can represent multiple clients. One or more clients 604 can be OLAP clients, OLTP clients, or a combination thereof.

[0096] The client 604 communicates with the database server 606. Through various subcomponents, the database server 606 can process requests for database operations, such as requests to store, read, or manipulate data. The session manager component 608 can be responsible for managing the connection between the client 604 and the database server 606, such as the client using a database programming interface (such as Java Database Connectivity (JDBC), Open Database Connectivity (ODBC), or Database Shared Library (DBSL)) to communicate with the database server. Typically, the session manager 608 can manage connections with multiple clients 604 at the same time. The session manager 608 can perform functions such as creating a new session for a client request, assigning a client request to an existing session, and authenticating access to the database server 606. For each session, the session manager 608 can maintain a context that stores a set of parameters related to the session, such as settings related to committing a database transaction or a transaction isolation level (such as statement-level isolation or transaction-level isolation).

[0097] For other types of clients 604, such as web-based clients (such as clients using the HTTP protocol or similar transport protocol), the client can interface with an application manager component 610. Although illustrated as a component of the database server 606, in other implementations, the application manager 610 can be external to the database server 606, but in communication with the database server 606. The application manager 610 can initiate new database sessions with the database server 606 in a manner similar to the session manager 608 and perform other functions.

[0098] The application manager 610 can determine the type of application requesting a database operation, such as by invoking or executing a process call, generating a query language statement, or converting data between formats usable by the client 604 and the database server 606, and mediate the execution of the request at the database server 606. In a specific example, the application manager 610 receives a request for a database operation from the client 604, but does not store information related to the request, such as state information.

[0099] Once a connection is established between client 604 and database server 606, including when established through application manager 610, execution of client requests is typically performed using a query language, such as structured query language (SQL). In executing a request, session manager 608 and application manager 610 may communicate with query interface 612. Query interface 612 may be responsible for creating a connection with the appropriate execution component of database server 606. Query interface 612 may also be responsible for determining whether a request is associated with a previously cached statement or stored procedure, and calling a stored procedure or associating a previously cached statement with the request.

[0100] At least some types of database operation requests (such as write data or manipulate data, query language statements) can be associated with a transaction context. In at least some implementations, each new session can be assigned to a transaction. Transactions can be managed by a transaction manager component 614. The transaction manager component 614 can be responsible for operations such as coordinating transactions, managing transaction isolation, tracking running and closed transactions, and managing the submission or rollback of transactions. When performing these operations, the transaction manager 614 can communicate with other components of the database server 606.

[0101] The query interface 612 can communicate with a query language processor 616 (such as a structured query language processor). For example, the query interface 612 can forward query language statements or other database operation requests from the client 604 to the query language processor 616. The query language processor 616 can include a query language executor 620 (e.g., a SQL executor), which can include a thread pool 624. Some requests for database operations or components thereof can be executed directly by the query language processor 616. The query language processor 616 can forward other requests or components thereof to another component of the database server 606. For example, transaction control statements (e.g., commit or rollback operations) can be forwarded by the query language processor 616 to the transaction manager 614. In at least some cases, the query language processor 616 is responsible for performing operations that retrieve or manipulate data (e.g., SELECT, UPDATE, DELETE). Other types of operations, such as queries, can be sent by the query language processor 616 to other components of the database server 606. The query interface 612 and the session manager 608 can maintain and manage context information associated with requests for database operations. In certain implementations, the query interface 612 can maintain and manage context information for requests received through the application manager 610 .

[0102] When a connection is established between the client 604 and the database server 606 through the session manager 608 or the application manager 610, a client request (such as a query) can be assigned to a thread of the thread pool 624, such as using the query interface 612. In at least one implementation, a thread is associated with a context for performing processing activities. The thread can be managed by the operating system of the database server 606, or by another component of the database server, or in conjunction with another component of the database server. Typically, at any time, the thread pool 624 contains multiple threads. At least in some cases, such as in response to the activity level at the database server 606, the number of threads in the thread pool 624 can be dynamically adjusted. In certain aspects, each thread of the thread pool 624 can be assigned to multiple different sessions.

[0103] When a query is received, the session manager 608 or application manager 610 may determine whether an execution plan for the query already exists, such as in the plan cache 636. If the query execution plan exists, the cached execution plan may be retrieved and forwarded to the query language executor 620, such as using the query interface 612. For example, the query may be sent to an execution thread of a thread pool 624 determined by the session manager 608 or application manager 610. In a specific example, the query plan is implemented as an abstract data type.

[0104] If the query is not associated with an existing execution plan, the query can be parsed using a query language parser 628. The query language parser 628 can, for example, check the query language statements of the query to ensure that they have correct syntax and confirm that the statements are otherwise valid. For example, the query language parser 628 can check to see whether the tables and records referenced in the query language statements are defined in the database server 606.

[0105] The query may also be optimized using a query language optimizer 632. The query language optimizer 632 may manipulate elements of a query language statement to allow for more efficient processing of the query. For example, the query language optimizer 632 may perform operations such as unnesting a query or determining an optimized execution order for various operations in a query (such as operations within a statement). After optimization, an execution plan may be generated or compiled for the query. In at least some cases, the execution plan may be cached in, for example, a plan cache 636, which may be retrieved (such as by a session manager 608 or an application manager 610) if the query is received again.

[0106] Once a query execution plan is generated or received, the query language executor 620 can oversee the execution of the query execution plan. For example, the query language executor 620 can call the appropriate subcomponents of the database server 606.

[0107] When executing a query, the query language executor 620 can call a query processor 640, which can include one or more query processing engines. The query processing engine can include, for example, an OLAP engine 642, a join engine 644, an attribute engine 646, or a calculation engine 648. For example, the OLAP engine 642 can apply rules to create an optimized execution plan for an OLAP query. The join engine 644 can be used to implement relational operators, typically for non-OLAP queries, such as joins and aggregation operations. In a specific implementation, the attribute engine 646 can implement column data structures and access operations. For example, the attribute engine 646 can implement merge functions and query processing functions, such as scanning columns.

[0108] In some cases, such as if a query involves complex or internally parallelized operations or sub-operations, the query executor 620 may send the operations or sub-operations of the query to a job executor component 654, which may include a thread pool 656. The execution plan for the query may include multiple plan operators. In a specific implementation, each job execution thread of the job execution thread pool 656 may be assigned to a separate plan operator. The job executor component 654 may be used to execute at least a portion of the operators of the query in parallel. In some cases, the plan operators may be further divided and parallelized, such as having operations access different parts of the same table simultaneously. Using the job executor component 654 may increase the load on one or more processing units of the database server 606, but may improve the execution time of the query.

[0109] The query processing engine of the query processor 640 can access data stored in the database server 606. The data can be stored in a row-by-row format in the row store 662 or in a column-by-column format in the column store 664. In at least some cases, the data can be converted between the row-by-row format and the column-by-column format. Certain operations performed by the query processor 640 can access or manipulate data in the row store 662 or the column store 664, or at least for certain types of operations (e.g., joins, merges, and subqueries), can access or manipulate both the row store 662 and the column store 664. In at least some aspects, the row store 662 and the column store 664 can be maintained in main memory.

[0110] The persistence layer 668 may communicate with the row store 662 and the column store 664. The persistence layer 668 may be responsible for actions such as committing write transactions, storing redo log entries, rolling back transactions, and periodically writing data to storage to provide persistent data 672.

[0111] When executing a request for a database operation (such as a query or a transaction), the database server 606 may need to access information stored in another location (such as another database server). The database server 606 may include a communication manager 680 component to manage such communications. The communication manager 680 may also mediate communications between the database server 606 and the client 604 or the application manager 610 when the application manager is located outside the database server.

[0112] In some cases, database server 606 may be part of a distributed database system that includes multiple database servers. At least a portion of a database server may include some or all of the components of database server 606. In some cases, a database server of a database system may store multiple copies of data. For example, a table may be replicated on more than one database server. Additionally or alternatively, information in a database system may be distributed among multiple servers. For example, a first database server may store a copy of a first table, and a second database server may store a copy of a second table. In yet another implementation, information may be divided among database servers. For example, a first database server may store a first portion of a first table, and a second database server may store a second portion of the first table.

[0113] When executing a request for a database operation, the database server 606 may need to access other database servers or other information sources within the database system. The communication manager 680 may be used to mediate such communications. For example, the communication manager 680 may receive and route requests for information from a component of the database server 606 (or from another database server), and receive and route replies.

[0114] Database system 600 may include an imprint manager / comparator 684. Imprint manager / comparator 684 may define bins to provide bin definitions 686. In creating bins, imprint manager / comparator 684 may use the techniques described in Examples 1-5, including creating bins based at least in part on workload, creating bin sets that include bins of frequently occurring values, or a combination thereof. Imprint manager / comparator 684 may create an imprint for data or a query, including using bin definitions 686. Imprinting of data may include constructing an imprint bit slice that summarizes the data on a bin-by-bin basis. Comparator 688 may compare data and query imprints to determine data that may be relevant to the query.

[0115] Example 7 – Example Operation Using Data Imprint

[0116] Figure 7 is a flow chart of a method 700 for defining an imprint of a data set using bins defined at least in part based on a received query for the data set. The method 700 may be performed at Figure 6 The database system 600 is implemented in the database system 600.

[0117] At 704, a plurality of first queries are received. Each query specifies a lower bound value and an upper bound value for a value type. At 708, a plurality of unique values ​​for the value type are determined. The data set is partitioned into a plurality of discrete subsets. At 712, a plurality of bins are defined based at least in part on the upper bounds and the lower bounds specified by the plurality of first queries. A given bin in the plurality of bins includes at least one unique value in the plurality of unique values. At 716, a fingerprint is defined for at least one discrete data subset of the plurality of data subsets. For each bin in the plurality of bins, the fingerprint identifies whether a unique value associated with the given bin is present in at least one discrete data subset.

[0118] Figure 8 is a flow chart of a method 800 for defining bins of a data set, wherein bins are designated as being associated with values ​​exceeding a threshold frequency. The method 800 may be performed at Figure 6 The database system 600 is implemented in the database system 600.

[0119] At 804, a plurality of unique values ​​are determined for a value type in a data set. The data set is partitioned into a plurality of discrete data subsets. At 808, at least one unique value having a frequency that satisfies a threshold is determined. At 812, a plurality of bins are defined. A given bin in the plurality of bins includes at least one unique value in the plurality of unique values.

[0120] At 816, a first bin is designated to be associated with unique values ​​that satisfy a threshold. At 820, the first bin is associated with at least one unique value. At least for unique values ​​in the plurality of unique values ​​other than the at least one unique value, at 824, unique values ​​are associated with bins in the plurality of bins other than the first bin. At 828, a signature is defined for at least one discrete data subset of the plurality of discrete data subsets. For each bin in the plurality of bins, the signature identifies whether the unique value associated with the given bin is present in the at least one discrete data subset.

[0121] Fig. 9 is a flow chart of a method 900 for defining a bin imprint. The method 900 may be Figure 6 The database system 600 is implemented in the database system 600.

[0122] At 904, a data set is partitioned into a plurality of data subsets. At 908, a plurality of unique values ​​in the data set are determined. At 912, a plurality of bins are defined. Each bin in the plurality of bins is associated with at least one unique value in the plurality of unique values. At 916, bin fingerprints of the plurality of bins are defined. The bin fingerprints identify whether a data subset in the plurality of data subsets includes a value associated with a respective bin.

[0123] Example 8 – Computing Systems

[0124] Fig.10A generalized example of a suitable computing system 1000 is depicted in which the described innovations may be implemented. The computing system 1000 is not intended to suggest any limitation as to the scope of use or functionality of the present disclosure, as the innovations may be implemented in various general-purpose or special-purpose computing systems.

[0125] refer to Fig.10 , the computing system 1000 includes one or more processing units 1010, 1015 and memories 1020, 1025. Fig.10 , the basic configuration 1030 is included within the dashed line. Processing units 1010, 1015 execute computer executable instructions such as for implementing the features described in Examples 1-7. The processing unit can be a general-purpose central processing unit (CPU), a processor in an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or any other type of processor, or combination of processors. In a multi-processing system, multiple processing units execute computer executable instructions to increase processing power. For example, Fig.10 A central processing unit 1010 and a graphics processing unit or co-processing unit 1015 are shown. Tangible memory 1020, 1025 may be volatile memory (e.g., registers, cache, RAM), non-volatile memory (e.g., ROM, EEPROM, flash memory, etc.), or some combination of the two accessible by the processing units 1010, 1015. The memory 1020, 1025 stores software 1080 implementing one or more innovations described herein in the form of computer-executable instructions suitable for execution by the processing units 1010, 1015.

[0126] The computing system 1000 may have additional features. For example, the computing system 1000 includes storage 1040, one or more input devices 1050, one or more output devices 1060, and one or more communication connections 1070, including input devices, output devices, and communication connections for interacting with a user. An interconnection mechanism (not shown) such as a bus, controller, or network interconnects the components of the computing system 1000. Typically, operating system software (not shown) provides an operating environment for other software executed in the computing system 1000 and coordinates the activities of the components of the computing system 1000.

[0127] Tangible storage 1040 may be removable or non-removable and include disks, magnetic tapes or cartridges, CD-ROMs, DVDs, or any other medium that can be used to store information in a non-transitory manner and that can be accessed within computing system 1000. Storage 1040 stores instructions for software 1080 to implement one or more innovations described herein.

[0128] Input device 1050 may be a touch input device (such as a keyboard, mouse, pen, or trackball), a voice input device, a scanning device, or other device that provides input to computing system 1000. Output device 1060 may be a display, a printer, a speaker, a CD burner, or other device that provides output from computing system 1000.

[0129] Communication connection 1070 enables communication to another computing entity via a communication medium. The communication medium transmits information, such as computer executable instructions, audio or video input or output, or other data in a modulated data signal. A modulated data signal is a signal that has one or more characteristics of the signal set or changed in a manner that encodes information in the signal. By way of example and not limitation, the communication medium may use electrical, optical, RF or other carriers.

[0130] Innovations can be described in the general context of computer executable instructions, such as instructions included in program modules, which are executed in a computing system on a target real or virtual processor. Typically, program modules or components include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functionality of program modules can be combined or separated between program modules as needed. Computer executable instructions for program modules can be executed in local or distributed computing systems.

[0131] The terms "system" and "device" are used interchangeably herein. Unless the context clearly indicates otherwise, neither term implies any limitation on the type of computing system or computing device. In general, a computing system or computing device may be local or distributed, and may include any combination of special-purpose hardware and / or general-purpose hardware and software that implements the functionality described herein.

[0132] In the various examples described herein, a module (e.g., a component or an engine) can be "encoded" to perform a specific operation or provide a specific functionality, indicating that the computer executable instructions of the module can be executed to perform such an operation, cause such an operation to be performed, or otherwise provide such functionality. Although the functionality described with respect to a software component, module, or engine can be performed as discrete software units (e.g., procedures, functions, class methods), it does not need to be implemented as discrete units. That is, the functionality can be combined into a larger or more general program, such as one or more lines of code in a larger or general program.

[0133] For presentation purposes, the detailed description uses terms such as "determine" and "use" to describe computer operations in a computing system. These terms are high-level abstractions of operations performed by computers and should not be confused with actions performed by humans. The actual computer operations corresponding to these terms vary depending on the implementation.

[0134] Example 9 – Cloud Computing Environment

[0135] Fig.11 An example cloud computing environment 1100 is depicted in which the described techniques may be implemented. Cloud computing environment 1100 includes cloud computing services 1110. Cloud computing services 1110 may include various types of cloud computing resources, such as computer servers, data repositories, network resources, etc. Cloud computing services 1110 may be centrally located (e.g., provided by a data center of an enterprise or organization) or distributed (e.g., provided by various computing resources located in different locations (such as different data centers) and / or located in different cities or countries).

[0136] The cloud computing service 1110 is used by various types of computing devices (e.g., client computing devices), such as computing devices 1120, 1122, and 1124. For example, the computing devices (e.g., 1120, 1122, and 1124) can be computers (e.g., desktop or laptop computers), mobile devices (e.g., tablet computers or smart phones), or other types of computing devices. For example, the computing devices (e.g., 1120, 1122, and 1124) can utilize the cloud computing service 1110 to perform computing operations (e.g., data processing, data storage, etc.).

[0137] Example 10 – Implementation

[0138] Although the operations of some disclosed methods are described in a particular sequential order for ease of presentation, it should be understood that such description includes rearrangement unless the specific language set forth herein requires a particular ordering. For example, the operations described in sequence may be rearranged or performed simultaneously in some cases. In addition, for simplicity, the accompanying drawings may not illustrate the various ways in which the disclosed methods may be used in conjunction with other methods.

[0139] Any of the disclosed methods may be implemented as computer-executable instructions or computer program products stored on one or more computer-readable storage media and executed on a computing device (e.g., any available computing device, including a smartphone or other mobile device that includes computing hardware). A tangible computer-readable storage medium is any available tangible medium that can be accessed in a computing environment (e.g., one or more optical media disks such as DVDs or CDs, volatile memory components such as DRAM or SRAM, or non-volatile memory components such as flash memory or a hard drive). As an example and with reference to Fig.10 , computer-readable storage media include memories 1020 and 1025 and storage device 1040. The term computer-readable storage medium does not include signals and carrier waves. In addition, the term computer-readable storage medium does not include communication connections (eg, 1070).

[0140] Any computer executable instructions for implementing the disclosed technology and any data created and used during the implementation of the disclosed embodiments can be stored on one or more computer readable storage media. Computer executable instructions can be, for example, a dedicated software application or part of a software application accessed or downloaded through a web browser or other software application (e.g., a remote computing application). Such software can be executed, for example, on a single local computer (e.g., any suitable commercially available computer) or in a network environment (e.g., via the Internet, a wide area network, a local area network, a client-server network using one or more network computers (such as a cloud computing network or other such network)).

[0141] For the sake of clarity, only certain selected aspects of software-based implementations are described. It should be understood that the disclosed techniques are not limited to any particular computer language or program. For example, the disclosed techniques can be implemented by software written in C++, Java, Perl, JavaScript, Python, Ruby, ABAP, SQL, Adobe Flash, or any other suitable programming language, or in some examples, by a markup language such as html or XML, or a combination of suitable programming languages ​​and markup languages. Likewise, the disclosed techniques are not limited to any particular computer or hardware type.

[0142] In addition, any software-based embodiments (including, for example, computer-executable instructions for causing a computer to perform any disclosed method) can be uploaded, downloaded, or remotely accessed via suitable communication means, including, for example, the Internet, the World Wide Web, an intranet, a software application, cables (including fiber optic cables), magnetic communications, electromagnetic communications (including RF, microwave, and infrared communications), electronic communications, or other such communications means.

[0143] The disclosed methods, apparatuses, and systems should not be construed as limiting in any way. Instead, the present disclosure is directed to all novel and non-obvious features and aspects of the various disclosed embodiments, both individually and in various combinations and sub-combinations with each other. The disclosed methods, apparatuses, and systems are not limited to any particular aspect or feature or combination thereof, nor do the disclosed embodiments require the presence of any one or more specific advantages, or the resolution of problems.

[0144] The technology from any example can be combined with the technology described in any one or more other examples. In view of the many possible embodiments to which the principles of the disclosed technology can be applied, it should be recognized that the illustrated embodiments are examples of the disclosed technology and should not be regarded as limiting the scope of the disclosed technology. On the contrary, the scope of the disclosed technology includes what is covered by the scope and spirit of the appended claims.

Claims

1. A computing system, include: one or more memories; one or more processing units coupled to one or more memories; and One or more computer-readable storage media storing computer-executable instructions for: receiving a plurality of first queries, wherein each first query of the plurality of first queries specifies a lower value and an upper value of a value type; determining a plurality of unique values ​​for the value type in a data set, the data set being partitioned into a plurality of discrete data subsets; defining a plurality of bins based on upper and lower bounds specified by the plurality of first queries and based on weights assigned to the plurality of unique values, wherein a given bin of the plurality of bins includes at least one unique value of the plurality of unique values; determining a cost of placing a first bin boundary at one of an upper bound or a lower bound based on the weight, wherein the weight is determined based on a number of queries requesting a certain value and / or a number of times a certain value appears in the data set, wherein the first bin boundary defines the at least one unique value associated with at least one bin of the plurality of bins; iteratively defining additional bin boundaries based on the cost of any previously defined bin boundaries, wherein the cost of any previously defined bin boundaries is determined based on the same manner as the cost of placing the first bin boundary was determined; and A fingerprint is defined for at least one discrete data subset of the plurality of discrete data subsets, wherein, for each bin of the plurality of bins, the fingerprint identifies whether a unique value associated with the given bin is present in the at least one discrete data subset.

2. The computing system of claim 1 , wherein the imprint comprises a bit vector having a plurality of bits, wherein the bits in the bit vector correspond to bins in the plurality of bins, and wherein the bits in the bit vector have a value of 1 if the at least one discrete data subset includes at least one value associated with a given bin, and have a value of 0 otherwise. 3 . The computing system of claim 2 , wherein a length of the bit vector is equal to a number of bins in the plurality of bins.

4. The computing system of claim 1, wherein the operation further include: receiving a second query requesting one or more values ​​of the data set, wherein the one or more values ​​correspond to values ​​of the plurality of unique values; defining a query fingerprint for the second query, the query fingerprint indicating a value requested by the second query; comparing the query fingerprint to one or more fingerprints of one or more of the data subsets; Based on the comparison, determining one or more data subsets that contain the value requested by the second query; and In response to the second query, a subset of data including the values ​​requested by the second query is sent. 5 . The computing system of claim 4 , wherein the query fingerprint comprises a query bit vector, and the comparing comprises performing a logical AND operation between the query bit vector and the bit vectors of the one or more data subsets.

6. A method implemented in a computing environment comprising a processor and a memory coupled to the processor, the method include: receiving a plurality of first queries, wherein each first query of the plurality of first queries specifies a lower value and an upper value of a value type; determining a plurality of unique values ​​for the value type in a data set, the data set being partitioned into a plurality of discrete data subsets; defining a plurality of bins based on upper and lower bounds specified by the plurality of first queries and based on weights assigned to the plurality of unique values, wherein a given bin of the plurality of bins includes at least one unique value of the plurality of unique values; determining a cost of placing a first bin boundary at one of the upper or lower bounds based on the weights, wherein the weights are determined based on a number of queries requesting a certain value and / or a number of times a certain value appears in the data set, wherein the first bin boundary defines the at least one unique value associated with at least one bin of the plurality of bins; iteratively defining additional bin boundaries based on the cost of any previously defined bin boundaries, wherein the cost of any previously defined bin boundaries is determined based on the same manner as the cost of placing the first bin boundary was determined; and A fingerprint is defined for at least one discrete data subset of the plurality of discrete data subsets, wherein, for each bin of the plurality of bins, the fingerprint identifies whether a unique value associated with a given bin is present in the at least one discrete data subset.

7. The method of claim 6, wherein the imprint comprises a bit vector having a plurality of bits, wherein the bits in the bit vector correspond to bins in the plurality of bins, and wherein the bits in the bit vector have a value of 1 if the at least one discrete data subset includes at least one value associated with a given bin, and have a value of 0 otherwise. The method of claim 7 , wherein the length of the bit vector is equal to the number of bins in the plurality of bins.

9. The method according to claim 6, further comprising: include: receiving a second query requesting one or more values ​​of the data set, wherein the one or more values ​​correspond to the plurality of unique values; defining a query fingerprint for the second query, the query fingerprint indicating a value requested by the second query; comparing the query fingerprint to one or more fingerprints of one or more discrete data subsets of the plurality of discrete data subsets; Based on the comparison, determining one or more data subsets that contain the value requested by the second query; and In response to the second query, a subset of data including the values ​​requested by the second query is sent.

10. The method of claim 9, wherein the query fingerprint comprises a query bit vector, and the comparing comprises performing a logical AND operation between the query bit vector and the bit vectors of the one or more data subsets.

11. One or more computer-readable storage media, include: Computer executable instructions that, when executed by a computing system, cause the computing system to receive a plurality of first queries, wherein each first query of the plurality of first queries specifies a lower value and an upper value of a value type; Computer executable instructions that, when executed by a computing system, cause the computing system to partition a data set into a plurality of discrete data subsets; computer executable instructions that, when executed by a computing system, cause the computing system to determine a plurality of unique values ​​for the value type in the data set; computer executable instructions that, when executed by a computing system, cause the computing system to define a plurality of bins based on upper and lower bounds specified by the plurality of first queries and based on weights assigned to the plurality of unique values, wherein a given bin of the plurality of bins includes at least one unique value of the plurality of unique values; computer executable instructions that, when executed by a computing system, cause the computing system to determine a cost of placing a first bin boundary at one of an upper bound or a lower bound based on the weight, wherein the weight is determined based on a number of queries requesting a certain value and / or a number of times a certain value appears in the data set, wherein the first bin boundary defines the at least one unique value associated with at least one of the plurality of bins; Computer executable instructions that, when executed by a computing system, cause the computing system to iteratively define additional bin boundaries based on the cost of any previously defined bin boundaries, wherein the cost of any previously defined bin boundaries is determined based on the same manner as the cost of placing the first bin boundary was determined; and Computer executable instructions that, when executed by a computing system, cause the computing system to define a signature for at least one of the plurality of discrete data subsets, wherein, for each of the plurality of bins, the signature identifies whether a unique value associated with a given bin is present in the at least one discrete data subset.

12. One or more computer-readable storage media according to claim 11, wherein the bin imprint comprises a bit vector having a plurality of bits, wherein the bits in the bit vector correspond to the plurality of data subsets, and if the data subset includes at least one value associated with a given bin, then the bit in the bit vector has a value of 1, otherwise it has a value of 0.

13. The one or more computer-readable storage media of claim 12, wherein the length of the bit vector is equal to the number of data subsets.

14. The one or more computer-readable storage media of claim 12, further comprising: include: The computer executable instructions, when executed by a computing system, cause the computing system to compress the bit vector.

15. The one or more computer-readable storage media of claim 11, further comprising: include: Computer executable instructions that, when executed by a computing system, cause the computing system to receive a second query requesting one or more values ​​in the data set, wherein the one or more values ​​correspond to values ​​of the plurality of unique values; computer executable instructions that, when executed by a computing system, cause the computing system to define a query fingerprint for the second query, the query fingerprint indicating a value requested by the second query; computer executable instructions that, when executed by a computing system, cause the computing system to compare the query fingerprint to one or more fingerprints of one or more of the plurality of data subsets; computer executable instructions that, when executed by a computing system, cause the computing system to determine, based on the comparison, one or more subsets of data that contain the value requested by the second query; and The computer executable instructions, when executed by a computing system, cause the computing system to send, in response to the second query, a subset of data containing the values ​​requested by the second query.

16. The one or more computer-readable storage media of claim 15, wherein the query imprint comprises a query bit vector, and the comparing comprises performing a logical AND operation between the query bit vector and a bit vector of the bin imprint.