You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/10/26 18:54:00 UTC

[jira] [Commented] (CALCITE-4355) Improve cost estimates for recursive queries

    [ https://issues.apache.org/jira/browse/CALCITE-4355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17220934#comment-17220934 ] 

Julian Hyde commented on CALCITE-4355:
--------------------------------------

TL;DR (from section 2.1):
{quote}We estimate the number N of iterations as:

N = log{~}s~(K)

where K = rowCount(R ⨝ X) is the estimated number of tuples in
 the recursive part of the fixpoint.
{quote}
The following simple example illustrates. Suppose an Employees table has 1,000 employees, and that each manager has on average 10 direct reports. Joining an employee to a manager has selectivity of 0.1. Computing the transitive closure is expected to take 3 iterations, because log{~}10~(1000) is 3.

> Improve cost estimates for recursive queries
> --------------------------------------------
>
>                 Key: CALCITE-4355
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4355
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Michael Mior
>            Priority: Major
>
> I happened to notice [this paper|https://dl.acm.org/doi/abs/10.1145/3340531.3417460] which cites the Calcite paper. They propose improvements on cost estimation over assuming a fixed number of iterative steps which Calcite currently does.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)