Commit 2e42e72
SNOW-2042703 - Upper bound for row estimates when resulting from a cartesian product (#3578)
SNOW-2042703 - Upper bound for row estimates when resulting from a cartesian product
There was a significant performance regression in astronomer_attribution resulting from
the row estimatation. After some investigation the issue seems to occur after we estimate
rows from the cartesian product in an align ( and possibly join too ). When the result
of this estimation is very large set_frame_2d_labels seems to take a very long time as well.
We had added a "hack" to _get_rows in SnowflakeQueryCompiler to catch this case and
recalculate rows manually when we absolutely need it, but we apparently use this information
in other places as well.
Returning None when this product is very large (>1e34) reduces astronomer attribution from
940s to 9s on my machine, and returning None from the row estimator is a conservative and
reasonable thing to do ( we should never fully count on estimates ).
We still need to figure out why this value would cause such a problem, and potentially fix
that code as well. Even with a very high maximum estimated upper bound on rows we should
not cause a performance regression.
This should provide some relief from those workloads though.
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>1 parent 6da287e commit 2e42e72
File tree
5 files changed
+59
-5
lines changed- src/snowflake/snowpark/modin/plugin
- _internal
- compiler
- tests
- integ/modin/hybrid
- unit/modin
5 files changed
+59
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
| |||
99 | 110 | | |
100 | 111 | | |
101 | 112 | | |
102 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
313 | 316 | | |
314 | 317 | | |
315 | 318 | | |
| |||
772 | 775 | | |
773 | 776 | | |
774 | 777 | | |
| 778 | + | |
| 779 | + | |
775 | 780 | | |
776 | 781 | | |
777 | 782 | | |
778 | | - | |
| 783 | + | |
| 784 | + | |
779 | 785 | | |
780 | 786 | | |
781 | 787 | | |
| |||
791 | 797 | | |
792 | 798 | | |
793 | 799 | | |
794 | | - | |
| 800 | + | |
795 | 801 | | |
796 | 802 | | |
797 | 803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
0 commit comments