You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7588aeb
Browse filesBrowse the repository at this point in the historyBrowse files
Ilia Evdokimov
authored and
hackorum
committed
Improve selectivity estimation for OR clauseswith equality conditions on the same column
Copy file name to clipboardExpand all lines: src/test/regress/expected/stats_ext.out
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1417,19 +1417,19 @@ SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE
1417
1417
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE (a = 1 OR a = 51) AND b = ''1''');
1418
1418
estimated | actual
1419
1419
-----------+--------
1420
-
99 | 100
1420
+
100 | 100
1421
1421
(1 row)
1422
1422
1423
1423
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE (a = 1 OR a = 51) AND (b = ''1'' OR b = ''2'')');
1424
1424
estimated | actual
1425
1425
-----------+--------
1426
-
99 | 100
1426
+
100 | 100
1427
1427
(1 row)
1428
1428
1429
1429
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE (a = 1 OR a = 2 OR a = 51 OR a = 52) AND (b = ''1'' OR b = ''2'')');
1430
1430
estimated | actual
1431
1431
-----------+--------
1432
-
197 | 200
1432
+
200 | 200
1433
1433
(1 row)
1434
1434
1435
1435
-- OR clauses referencing different attributes are incompatible
@@ -1763,19 +1763,19 @@ SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE
1763
1763
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE ((a * 2) = 2 OR (a * 2) = 102) AND upper(b) = ''1''');
1764
1764
estimated | actual
1765
1765
-----------+--------
1766
-
99 | 100
1766
+
100 | 100
1767
1767
(1 row)
1768
1768
1769
1769
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE ((a * 2) = 2 OR (a * 2) = 102) AND (upper(b) = ''1'' OR upper(b) = ''2'')');
1770
1770
estimated | actual
1771
1771
-----------+--------
1772
-
99 | 100
1772
+
100 | 100
1773
1773
(1 row)
1774
1774
1775
1775
SELECT * FROM check_estimated_rows('SELECT * FROM functional_dependencies WHERE ((a * 2) = 2 OR (a * 2) = 4 OR (a * 2) = 102 OR (a * 2) = 104) AND (upper(b) = ''1'' OR upper(b) = ''2'')');
0 commit comments