{"id":3707,"date":"2023-09-13T10:47:59","date_gmt":"2023-09-13T10:47:59","guid":{"rendered":"https:\/\/wp.sigmod.org\/?p=3707"},"modified":"2024-07-03T18:36:39","modified_gmt":"2024-07-03T18:36:39","slug":"the-case-for-cardinality-bounds-principled-conservatism-in-query-optimization","status":"publish","type":"post","link":"https:\/\/wp.sigmod.org\/?p=3707","title":{"rendered":"The Case for Cardinality Bounds: Principled Conservatism in Query Optimization"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Introduction<\/h3>\n\n\n\n<p>In the last decade, the database community has identified cardinality estimation as the primary stumbling block for modern query optimizers.&nbsp; Cardinality estimates, which estimate the size of sub-plan queries, are the primary basis for choosing between query plans, so poor estimates may result in catastrophic query execution plans. Research on this topic has consistently emphasized a few findings: 1) traditional query optimizers regularly underestimate by orders of magnitude, 2) the bad query plans are often orders of magnitude slower than good ones, and 3) underestimates are worse than overestimates.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1024x473.png\" alt=\"\" class=\"wp-image-3678\" width=\"743\" height=\"343\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1024x473.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-300x139.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-150x69.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-768x355.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-590x273.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-102x47.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed.png 1462w\" sizes=\"auto, (max-width: 743px) 100vw, 743px\" \/><\/figure>\n\n\n\n<p>To see this, consider a few graphs from the seminal 2015 benchmarking paper \u201cHow good are query optimizers really?\u201d. The first shows the performance of a few commercial query optimizers on the cardinality estimation problem. Even a series of battle-tested commercial optimizers consistently underestimate by orders of magnitude on this benchmark. Intuitively, this is because they all rely on some form of independence assumptions to simplify the problem. For instance, many of them assume that WHERE predicates on different columns randomly and independently filter rows. However, this assumption is almost always violated because columns are generally correlated, e.g. city and state columns.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3.png\" alt=\"\" class=\"wp-image-3682\" width=\"649\" height=\"558\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3.png 1012w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3-300x258.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3-150x129.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3-768x660.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3-407x350.png 407w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-1-3-83x71.png 83w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/figure>\n\n\n\n<p>The second figure demonstrates the performance of all possible plans for a few queries under different index configurations. For most queries, performance differs wildly between plans. A small proportion (~5%) of plans are within 10x of the optimal plan\u2019s performance, but the vast majority of plans are 2-4 orders of magnitude worse. In a perfect world, the query optimizer would simply choose the optimal plan, but this would require perfect cardinality estimates, which is impossible. Given this limitation, it makes sense to aim for an optimizer that simply avoids catastrophically bad plans. Most of these plans contain a sub-plan with a large intermediate join result which brings us to the core problem of underestimating cardinalities; A single underestimate of a large intermediate result can push the query optimizer to include that sub-plan, resulting in an overall plan that is much, much slower than the optimizer expects. For example, suppose that cardinality estimator A produces perfect cardinality estimates for 99% of intermediate results but drastically underestimates 1% of them. Despite estimator A\u2019s incredibly high average accuracy, the query optimizer will always select plans that incorporate these underestimated intermediates. On the other hand, suppose that cardinality estimator B produces perfect cardinality estimates for 99% of intermediates and drastically overestimates 1% of them. In this case, the query optimizer will simply ignore plans with bad estimates. If a single good plan is accurately estimated, then the optimizer will still produce a good query plan. In other words, systems that overestimate only need to be accurate for <em>at least one<\/em> good plan, while systems that underestimate need to be accurate for <em>every<\/em> bad query plan. This asymmetric risk is why recent benchmarks have shown much better performance when systems consistently produce overestimates.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recent CardEst Methods<\/h3>\n\n\n\n<p>Proposed methods for this problem have generally fallen into one of three categories: traditional, learned, and bound-based. Each of these angles has its own benefits and drawbacks to consider. We summarize the methods in all these categories, along with our newly proposed methods (FactorJoin and Safebound), in the following table.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-1024x753.png\" alt=\"\" class=\"wp-image-3683\" width=\"754\" height=\"554\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-1024x753.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-300x221.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-150x110.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-768x565.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-1536x1130.png 1536w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-476x350.png 476w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2-97x71.png 97w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-2.png 1574w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Traditional Approaches<\/h4>\n\n\n\n<p>The traditional cardinality estimators are the most commonly used method in DBMSes. The traditional histogram-based methods generally adopt attribute independence and join uniformity assumptions to decompose the join queries as a combination of single table estimates. They are very efficient, easy to train, update and maintain, thus perfect for system deployment. However, their simplifying assumptions can generate erroneous estimates and poor query plans.<\/p>\n\n\n\n<p>Sampling-based methods also have a long history in the database community. There are two fundamental issues facing sampling methods: the exponential decline of sample sizes as the number of joins increases and how to handle estimates when the sample doesn\u2019t include any satisfying tuples. To illustrate the first problem, consider a simple FK-PK join where rows are sampled from R and S independently with probability p. The likelihood that a row in the sample of R joins with a row in the sample of S is 1\/p. Immediately, the sampling probability for tuples in R effectively goes from 1\/p to 1\/p^2. This becomes exponentially worse as more tables are added to the query. For the second, consider a query with a filter predicate that doesn\u2019t match any tuples in our sample of R. At this point, the estimation algorithm has some information to infer the number of tuples in R, but it has no information to estimate how the filtered subset of R would interact with other tables in the query. The most promising sampling methods, such as WanderJoin, tend to avoid this problem by using dynamic sampling rather than computing samples offline, and they achieve very robust accuracy. However, this introduces further concerns about the maintenance of indices, the latency of accessing data during optimization, and increased code complexity.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Learned Approaches<\/h4>\n\n\n\n<p>\u03a4he learned cardinality estimators use the machine learning (ML) model to relax or eliminate the simplifying assumptions made by traditional methods. Their sophisticated ML models can provide accurate estimation but are subject to expensive training\/updating costs and slow inference speed.<\/p>\n\n\n\n<p>Query-driven ML methods learn cardinality estimates by running an example workload of queries and training a traditional ML model from the resulting (query, cardinality) pairs. These methods can achieve high accuracy on the queries which come from the same distribution as the example workload, and they are often very fast to both train and perform inference. However, running these example queries can be very time-consuming, and they often suffer significantly when faced with updates or queries that differ significantly from the example workload.<\/p>\n\n\n\n<p>Data-driven ML methods use unsupervised approaches which attempt to learn the data distribution directly rather than training on example queries. This allows for generalization to different query workloads and can be accurate depending on the complexity of the underlying models. However, the model complexity needed for accurate estimates grows quickly due to the inherent challenge of modeling all the complicated non-linear relationships between columns both within and between tables. Because of this, they generally take a long time to train and are slow to perform inference on, and have problems scaling to complicated schemas.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Previous Cardinality Bounds<\/h4>\n\n\n\n<p>The last approach is grounded in database theory and provides provable upper bounds on the query size rather than an average-case estimate. When used in place of traditional estimates, this guarantees that there will be no underestimates. Because bounds on query sizes are helpful for complexity analysis, these bounds have been thoroughly studied by the theory community and have motivated areas of algorithm design, such as worst-case-optimal join algorithms. However, the bound formulas, which are interesting to theoreticians, have generally relied on minimal statistics about the underlying dataset, e.g., the size of each table and the maximum frequency of each column. This provides good interpretability and insight, but it generally does not result in tight bounds that could be practically used by a query optimizer. The paper \u201cPessimistic Cardinality Estimation\u201d was the first work to attempt to adapt these formulas to cardinality estimation, and it managed to produce fairly tight bounds, which significantly improved query execution time. However, it couldn\u2019t handle filter predicates (e.g., \u201cR.A &lt; 10\u201d), and its inference latency increased exponentially in the granularity of its statistics.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Our Practical Cardinality Bounds<\/h4>\n\n\n\n<p>To effectively support filter predicates and enable efficient inference, we describe two novel practical bound-based cardinality estimators: FactorJoin and SafeBound. FactorJoin formulates the problem of cardinality estimation of general multi-table join queries as a well-studied inference problem in the field of probabilistic graphical models. FactorJoin can quickly construct a factor graph model from the database schema in the offline phase, which will be used to efficiently deliver a probabilistic cardinality bound for any query. SafeBound draws on recent theoretical advances in cardinality bounding to produce deterministic bounds using degree sequence statistics.<\/p>\n\n\n\n<p>These two approaches inherit the robustness of bound-based cardinality estimators while overcoming their drawbacks to provide flexible and efficient inference. The experimental results demonstrate that FactorJoin and SafeBound can achieve up to 80% lower end-to-end runtimes than PostgreSQL on well-established benchmarks. This performance is comparable to or better than the state-of-the-art (SOTA) machine learning methods. Furthermore, FactorJoin can achieve 40x less estimation latency, a 100x smaller model size, and 100x faster training\/updating than the previous SOTA methods. SafeBound can save up to 500x in query planning latency and 6.8x less space when compared to previous SOTA methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">FactorJoin<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Formulating Cardinality Estimation as PGM Inference Problem<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-1024x256.png\" alt=\"\" class=\"wp-image-3684\" width=\"680\" height=\"170\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-1024x256.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-300x75.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-150x38.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-768x192.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-1536x384.png 1536w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-590x148.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3-102x26.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-3.png 1600w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/figure>\n\n\n\n<p>Before looking at the formulation, let\u2019s go through a simple example of a query joining two tables. The figure above illustrates query ? joining tables ? and ? on the inner join1 condition ?.?? = ?.??? with base table filter predicates ?(?) and ?(?). Table ? first goes through the filter ?(?), resulting in an intermediate table ?|?(?) (records in ? that satisfy the filter ?(?)). The same procedure is applied to table ?. Then, the query ? will match the value of join keys ?.?? and ?.??? from these two intermediate tables. Specifically, the value ? appears 8 times in table ?|?(?) and 6 times in table ?|?(?), resulting in value ? appearing 48 times in the join result. Therefore, we can calculate the cardinality of this query ? as 8 \u00d7 6 + 4 \u00d7 5 + 3 \u00d7 5 = 83.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-1024x112.png\" alt=\"\" class=\"wp-image-3685\" width=\"703\" height=\"76\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-1024x112.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-300x33.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-150x16.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-768x84.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-590x65.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4-102x11.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-4.png 1530w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/figure>\n\n\n\n<p>We can formulate the above procedure for calculating ? as a statistical equation, where ?(?.??) denotes the domain of all unique values of ?.??. We observe that only single-table distributions ? and ? are required to accurately compute the ?? cardinality of this join query. Also in this equation, ?<sub>?<\/sub>(?.?? = ?|?(?)) \u2217 |?(?)| equals to ?<sub>?<\/sub>(?.?? = ? \u2227 ?(?)) \u2217 |?|, which is exactly what single-table CardEst methods estimate. Thus, we can accurately calculate the cardinalities of two-table join queries using single-table estimators. Note that the summation over the domain of join key D(?.??) has the same complexity as computing the join. Therefore, we need to approximate this calculation for FactorJoin to be practical.<\/p>\n\n\n\n<p>A general join query can involve a combination of different forms of joins (e.g., chain, star, self, or cyclic joins), so its counterpart equation of Equation 1 can be very difficult to derive and compute. We provide a generalizable formulation that automatically decomposes join queries into single-table estimations using the factor graph model. Let\u2019s take a look at a more complicated example below.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-1024x406.png\" alt=\"\" class=\"wp-image-3687\" width=\"714\" height=\"283\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-1024x406.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-300x119.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-150x59.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-768x305.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-590x234.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1-102x40.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-5-1.png 1180w\" sizes=\"auto, (max-width: 714px) 100vw, 714px\" \/><\/figure>\n\n\n\n<p>Figure (i) shows a SQL query ? joining four tables ?,?,?,?. We visualize its join template as a graph in Figure 3-(ii), where each dashed rectangle represents a table, each ellipse (node) represents a join-key in ?, and each solid line (edge) represents an equi-join relation between two join keys connected by it. Note that both sides of an equi-join relation represent the semantically equivalent join keys. We call them equivalent key group variables. In Figure (ii), there are three connected components and thus three equivalent key group variables?<sub>1<\/sub>,&#8230;,?<sub>3<\/sub>. ?<sub>1<\/sub> represents ?.?? and ?.??? in this group since ? contains the join condition ?.?? = ?.???.&nbsp;<\/p>\n\n\n\n<p>Next, we explain how to compute the cardinality of ? using a factor graph. Let\u2019s first explain what a factor graph is. A factor graph is a bipartite graph with two types of nodes: variable nodes, and factor nodes representing an unnormalized probability distribution w.r.t. the variables connected to it. Figure (iii) shows the constructed factor graph <em>F<\/em> for computing the cardinality of ?. Specifically, <em>F<\/em> contains a variable node for each equivalent key group variable ?, and a factor node for each table ? touched by ?. A factor node is connected to a variable node if the variable represents a key in the table. In this case, the factor node representing table ? is connected to ?<sub>1<\/sub> (equivalent to ?.??) and ?<sub>2<\/sub> (equivalent to ?.??<sub>2<\/sub>). Each factor node maintains an unnormalized probability distribution for the variable nodes connected to it, e.g., node ? maintains ?<sub>?<\/sub>(?<sub>1<\/sub>,?<sub>2<\/sub>|(?(?))) \u2217 |?(?)|, which is the same as the distribution ?<sub>?<\/sub>(?.??, ?.??<sub>2<\/sub>|(?(?))) \u2217 |?(?)|. The factor graph model utilizes the graph structure to compute the sum using well-studied inference algorithms. We can more formally state this relationship between computing the join cardinalities and factor graphs as the following lemma, whose proof is provided in the original paper.&nbsp;<\/p>\n\n\n\n<p><strong>Lemma1<\/strong>: Given a join graph <em>G<\/em> representing a query ?, there exists a factor graph <em>F<\/em> such that the variable nodes in <em>F<\/em> are the equivalent key group variables of <em>G<\/em> and each factor node represents a table ? touched by ?. A factor node is connected to a variable node if and only if this variable represents a joining key in table ?. The potential function of a factor node is defined as table ?\u2019s probability distribution of the connected variables (join keys) conditioned on the filter predicates ?(?). Then, calculating the cardinality of ? is equivalent to computing the partition function of<em> F<\/em>.<\/p>\n\n\n\n<p>The computation of such probabilistic inference on this factor graph is very expensive. The complexity is O(N * |D|<sup>max(|JK|)<\/sup>), where N is the number of equivalent key groups (3 in the above example), |D| is the largest domain size of all join keys, and ???(|??|) is the maximum number of join keys in a single table (2 in the above example). This complexity of conducting exact inference is not practical for real-world queries, as |D| can be millions, and ???(|??|) can be larger than 4 in real-world DB instances, such as IMDB.<\/p>\n\n\n\n<p>Therefore, in the following, we will show how FactorJoin designs approximate probabilistic inference on factor graph to estimate the cardinality, which reduces the complexity to O(N * k<sup>2<\/sup>) where N (less than 10) and k are typically small (hundreds).&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Efficient bound-based cardinality estimation<\/h4>\n\n\n\n<p>The key idea behind our bound-based approximate probabilistic inference on factor graph is to bin the domain D of the join key into k bins where we can compute an upper bound of cardinality within each bin. This helps reduce the complexity |D| to k, and users can arbitrarily set the number of bins k for performance-latency trade-offs. For example, Equation (1) above can be approximated as Equation (2).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-1024x236.png\" alt=\"\" class=\"wp-image-3688\" width=\"714\" height=\"164\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-1024x236.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-300x69.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-150x35.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-768x177.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-1536x354.png 1536w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-590x136.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6-102x24.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-6.png 1600w\" sizes=\"auto, (max-width: 714px) 100vw, 714px\" \/><\/figure>\n\n\n\n<p>Now, we will illustrate the probabilistic bound the within each bin using a simple example query Q joining two tables. Specifically, assuming that value {?, ?, ?, ?, ? } of ?.?? and ?.??? are binned into ???1 as shown in Figure 5. We know the summation of all values in bin<sub>1<\/sub> equals to 8\u00d76+4\u00d75+3\u00d75=83. This summation has a dominating term of 8 \u00d7 6, because the count of MFV of bin<sub>1<\/sub> is 8 for ?.?? (denoted as ?<sub>1<\/sub><sup>*<\/sup>(?.??)) and 6 for?.??? (denoted as ?<sub>2<\/sub><sup>*<\/sup>(?.???)) so each value can appear at most 8 \u00d7 6 times in the denormalized table after the join. Since we know the total count of values in bin<sub>1<\/sub> for ?.?? is 16, there can be at most 16\/8 = 2 MFVs. Similarly, there can be at most 4 MFVs in bin<sub>1<\/sub> for ?.???. Therefore, we have the summation of all values in bin<sub>1<\/sub> is upper bounded by ???(2, 4) \u00d7 8 \u00d7 6 = 96.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-1024x298.png\" alt=\"\" class=\"wp-image-3690\" width=\"675\" height=\"196\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-1024x298.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-300x87.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-150x44.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-768x223.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-590x172.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7-102x30.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-7.png 1512w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure>\n\n\n\n<p>We formally represent the aforementioned procedure in Equation (3),where ?<sub>i<\/sub><sup>\u2217<\/sup>(?.??) and ?<sub>?<\/sub>(?.?? \u2208???<sub>i<\/sub>|?(?)) \u2217 |?(?)| are the MFV count and estimated total count of ???<sub>i<\/sub> for?.??. Our bound is probabilistic because ?<sub>?<\/sub>(?.?? \u2208 ???<sub>?<\/sub>|?(?)) \u2217 |?(?)| is estimated with a single table CardEst method, which may have some errors.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-1024x234.png\" alt=\"\" class=\"wp-image-3692\" width=\"709\" height=\"161\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-1024x234.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-300x69.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-150x34.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-768x176.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-1536x351.png 1536w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-590x135.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1-102x23.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-8-1.png 1600w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/figure>\n\n\n\n<p>We evaluate the performance of our CardEst framework on two well-established benchmarks: STATS-CEB and IMDB- JOB and compare with a wide range of representative baselines, including traditional methods (PostgreSQL, JoinHist, WJSample), learned methods (MSCN, BayesCard, DeepDB, FLAT), bound-based methods (PessEst, U-Block) and the optimal baseline with true cardinality (TrueCard). The overall performance plots and tables are given below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-1024x250.png\" alt=\"\" class=\"wp-image-3694\" width=\"729\" height=\"178\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-1024x250.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-300x73.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-150x37.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-768x188.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-1536x375.png 1536w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-590x144.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1-102x25.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-9-1.png 1600w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-1024x555.png\" alt=\"\" class=\"wp-image-3695\" width=\"705\" height=\"382\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-1024x555.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-300x163.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-150x81.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-768x416.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-590x320.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10-102x55.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-10.png 1196w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-1024x392.png\" alt=\"\" class=\"wp-image-3696\" width=\"710\" height=\"271\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-1024x392.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-300x115.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-150x57.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-768x294.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-590x226.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11-102x39.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-11.png 1180w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/figure>\n\n\n\n<p>To summarize, FactorJoin achieves the best performance among all the baselines on both benchmarks. Specifically, FactorJoin is as effective as the previous state-of-the-art learned methods, and simultaneously as efficient and practical as the traditional CardEst methods.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SafeBound<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">The Degree Sequence Bound<\/h4>\n\n\n\n<p>Our goal in SafeBound was to make the theoretical work on cardinality bounding practical without sacrificing the deterministic, provable nature of the bounds. So, to understand SafeBound, we need to start by introducing the Degree Sequence Bound, which SafeBound is based on, and the degree sequence statistics, which that is based on.<\/p>\n\n\n\n<p>The degree sequence of a column in a database is the <em>sorted list of value frequencies<\/em>. As an example, consider the \u201cName\u201d column below and the accompanying degree sequence on its right. The name \u201cEseah\u201d is the most frequent value and appears 5 times, so there is a 5 at the start of the degree sequence. Carlos and Vivek both appear 3 times and so on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12.png\" alt=\"\" class=\"wp-image-3697\" width=\"638\" height=\"413\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12.png 914w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12-300x195.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12-150x97.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12-768x498.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12-539x350.png 539w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-12-102x66.png 102w\" sizes=\"auto, (max-width: 638px) 100vw, 638px\" \/><\/figure>\n\n\n\n<p>This statistic has a few nice characteristics that we take advantage of in our work: 1) it fully captures the skew of join columns, 2) it is monotonic and decreasing, 3) we can upper bound it very efficiently with simple piecewise constant functions. We can see all of these on a degree sequence from the IMDB dataset below. Specifically, this is the ActorID column in the CastInfo table, where each row represents a single actor being cast in a single movie or TV show. The most-cast actor appeared ~10,000 times, while over half of the actors appeared just a single time. Further, the true degree sequence is 4 million data points because there are over 4 million unique actors, but the approximation shown in green is only 7 segments while largely capturing the shape of the curve.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-1024x683.png\" alt=\"\" class=\"wp-image-3699\" width=\"708\" height=\"472\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-1024x683.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-300x200.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-150x100.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-768x512.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-525x350.png 525w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13-102x68.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-13.png 1135w\" sizes=\"auto, (max-width: 708px) 100vw, 708px\" \/><\/figure>\n\n\n\n<p>Without going into the mathematical details, the Degree Sequence Bound can be thought of as a black box algorithm. It takes in 1) a simple join query (only joins, no selections) and 2) the degree sequence approximations of every join column, and it outputs a provable, deterministic bound on the size of the query\u2019s output. Further, it does this in log-linear time with respect to the size of the approximations, so it\u2019s very fast when the approximations are small (~20 segments in our experiments).<\/p>\n\n\n\n<p>More details about this bound can be found in our theory paper <a href=\"https:\/\/drops.dagstuhl.de\/opus\/volltexte\/2023\/17750\/pdf\/LIPIcs-ICDT-2023-8.pdf\">here<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Handling Selection Predicates<\/h4>\n\n\n\n<p>Given that we have an effective algorithm for bounding join sizes given degree sequences, the main obstacle to bounding real queries is handling selection predicates (e.g., LIKE, =, &lt;,&gt;, NOT NULL). These predicates filter a relation, and the resulting relation often has a drastically different set of degree sequences. For instance, if we looked at the CastInfo table from above, a common predicate might be to filter for a particular movie (\u201cCastInfo.MovieId = 12345\u201d). The filtered degree sequence for the MovieId column would have a single element whose frequency is equal to the number of actors in the film. The naive approach to handling this would be to scan the table every time a predicate appeared and calculate the new degree statistics. However, this would take linear time in the size of the data, which is generally considered unacceptable for query optimization, particularly in the case of distributed systems.&nbsp;<\/p>\n\n\n\n<p>To tackle this problem, SafeBound adapts traditional summary statistics such as histograms, most-common value lists, and n-grams to the cardinality bounding setting. For starters, traditionally, you would store the number of rows in each bucket, value, or n-gram, but SafeBound stores the degree sequences of those rows. However, more subtle changes are required as well because simple operations like addition and multiplication don\u2019t work well with degree sequences and\/or result in true upper bounds. For instance, consider a range predicate that spans multiple buckets of a histogram. Without additional information, we need to do a pointwise addition of the degree sequences from each bucket. This assumes that the most (second most, third most, etc.) frequent value is the same across buckets and results in a very loose bound. To avoid this, we use overlapping, dyadic range intervals, as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14.png\" alt=\"\" class=\"wp-image-3700\" width=\"704\" height=\"414\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14.png 1008w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14-300x176.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14-150x88.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14-768x452.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14-590x347.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-14-102x60.png 102w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/figure>\n\n\n\n<p>Consider a range predicate Instead of simply adding the degree sequences of the [0,1], [1,2], [2,3], [3,4] buckets, we find the smallest bucket which fully encapsulates our range predicate and use the degree sequences stored there, resulting in much more accurate bounds.<\/p>\n\n\n\n<p>We similarly adapt MCV lists and n-grams, as described in the paper.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Building Efficient Approximations<\/h4>\n\n\n\n<p>The base of SafeBound is the degree sequence approximations, and it\u2019s not immediately clear how to build these approximations while balancing speed, accuracy, and space constraints. To handle this, SafeBound uses a novel two-pass algorithm called ValidCompress which takes inspiration from the PGM learned index and, more distantly, convex hull algorithms.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-1024x572.png\" alt=\"\" class=\"wp-image-3701\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-1024x572.png 1024w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-300x168.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-150x84.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-768x429.png 768w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-590x330.png 590w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15-102x57.png 102w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/07\/unnamed-15.png 1450w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>At a high level, this algorithm aims to minimize the bound for the self-join query by limiting the error induced by each segment to a particular threshold. By choosing the self-join as our metric, we rely on the assumption that tables join with similarly skewed tables. In the first pass of the algorithm, it calculates the self-join bound based on the exact degree sequence, which happens to be equivalent to the second moment of the degree sequence. In the second pass, it constructs piecewise segments one at a time, starting a new sequence every time the squared error exceeds some percent of the exact bound.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Experiments<\/h4>\n\n\n\n<p>While the full suite of experimental findings can be found in the paper, the most important findings are on the overall workload runtime. This directly measures the quality of the plans produced when using each cardinality estimation system. Specifically, we injected the estimates from each system into the query optimizer of Postgres and measured the total runtime of the workload relative to the runtime when Postgres is given the exact cardinalities for every sub-plan.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"319\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/unnamed-17.png\" alt=\"\" class=\"wp-image-3720\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/unnamed-17.png 497w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/unnamed-17-300x193.png 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/unnamed-17-150x96.png 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/unnamed-17-102x65.png 102w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/figure>\n\n\n\n<p>SafeBound achieves a roughly optimal overall runtime across all four benchmarks, while a traditional estimator like Postgres\u2019 built-in estimator is up to 75% slower. Further, compared to ML methods (BayesCard &amp; Neurocard), SafeBound has <strong>3-500x<\/strong> faster inference, <strong>3-6.8x<\/strong> smaller memory footprint, and <strong>2-17x<\/strong> faster construction time. Compared to PessEst, it has <strong>100x<\/strong> faster inference.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Blogger Profile<\/h3>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:29% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"602\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/Kyle_Deeds_Headshot_resized.jpg\" alt=\"\" class=\"wp-image-3715 size-full\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/Kyle_Deeds_Headshot_resized.jpg 450w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/Kyle_Deeds_Headshot_resized-224x300.jpg 224w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/Kyle_Deeds_Headshot_resized-112x150.jpg 112w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/Kyle_Deeds_Headshot_resized-262x350.jpg 262w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/Kyle_Deeds_Headshot_resized-53x71.jpg 53w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-small-font-size\">Kyle Deeds is a 4th year PhD student at the University of Washington advised by Dan Suciu and Magda Balazinska. His research interests include cardinality estimation, theoretical bounds on conjunctive queries, and array programming. Broadly, he wants to apply database optimization techniques to new computing paradigms.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:29% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"602\" src=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/ziniu-ID_photo.jpeg\" alt=\"\" class=\"wp-image-3716 size-full\" srcset=\"https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/ziniu-ID_photo.jpeg 602w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/ziniu-ID_photo-300x300.jpeg 300w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/ziniu-ID_photo-150x150.jpeg 150w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/ziniu-ID_photo-350x350.jpeg 350w, https:\/\/wp.sigmod.org\/wp-content\/uploads\/2023\/09\/ziniu-ID_photo-71x71.jpeg 71w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-small-font-size\">Ziniu Wu is 2<sup>nd<\/sup>&nbsp;year PhD student at MIT data system group, advised by Samuel Madden and Tim Kraska. His research focuses on cardinality estimation, query optimization, and new data mesh architecture.&nbsp;<\/p>\n<\/div><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>&nbsp;<sup>1<\/sup>Leis, Viktor, et al. &#8220;How good are query optimizers, really?.&#8221; <em>Proceedings of the VLDB Endowment<\/em> 9.3 (2015): 204-215.<\/p>\n\n\n\n<p><sup>2<\/sup>Kipf, Andreas, et al. &#8220;Learned Cardinalities: Estimating Correlated Joins with Deep Learning.&#8221;;&nbsp; Dutt, Anshaman, et al. \u201cSelectivity estimation for range predicates using lightweight models.\u201d; Wu, Peizhi, and Gao Cong. &#8220;A unified deep model of learning from both data and queries for cardinality estimation.&#8221; <em>Proceedings of the 2021 International Conference on Management of Data<\/em>. 2021.<\/p>\n\n\n\n<p><sup>3<\/sup>Yang, Zongheng, et al. &#8220;NeuroCard: one cardinality estimator for all tables.&#8221; <em>Proceedings of the VLDB Endowment<\/em> 14.1 (2020): 61-73; Zhu, Rong, et al. &#8220;FLAT: fast, lightweight and accurate method for cardinality estimation.&#8221; <em>arXiv preprint arXiv:2011.09022<\/em> (2020).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In the last decade, the database community has identified cardinality estimation as the primary stumbling block for modern query optimizers.&nbsp; Cardinality estimates, which estimate the size of sub-plan queries, are the primary basis for choosing between query plans, so poor estimates may result in catastrophic query execution plans. Research on this topic has consistently [&hellip;]<\/p>\n","protected":false},"author":103,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,64],"tags":[],"coauthors":[176],"class_list":["post-3707","post","type-post","status-publish","format-standard","hentry","category-databases","category-query-processing"],"views":1017,"_links":{"self":[{"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=\/wp\/v2\/posts\/3707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=\/wp\/v2\/users\/103"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3707"}],"version-history":[{"count":7,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=\/wp\/v2\/posts\/3707\/revisions"}],"predecessor-version":[{"id":3723,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=\/wp\/v2\/posts\/3707\/revisions\/3723"}],"wp:attachment":[{"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3707"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/wp.sigmod.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=3707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}