Suspicious Estimated Rows by DISTINCT
#90113
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
E-quick-win
Likely to be a quick win for someone experienced.
O-community
Originated from the community
T-sql-queries
SQL Queries Team
X-blathers-triaged
blathers was able to find an owner
Projects
Describe the problem
The number of estimated rows of the
SELECT
statement withRIGHT JOIN
is smaller than that withINNER JOIN
.To Reproduce
Expected behavior
The query plan of the first
SELECT
The query plan of the second
SELECT
For the
CROSS JOIN
operator in query plans, the firstSELECT
returns more estimated rows than the secondSELECT
. However, after theDISTINCT
operator, the firstSELECT
returns less estimated rows than the secondSELECT
. The results are unexpected.Environment:
cockroach sql
]Jira issue: CRDB-20590
The text was updated successfully, but these errors were encountered: