We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JOIN
The CROSS JOIN returns smaller number of estimated rows than the LEFT JOIN.
CROSS JOIN
LEFT JOIN
CREATE TABLE t0(c0 INT); INSERT INTO t0 VALUES(1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE VIEW v0(c0, c1, c2) AS SELECT 'a', NULL, t0.c0 FROM t0 GROUP BY DEFAULT(t0.c0) HAVING SUM(1); ANALYZE TABLE t0; EXPLAIN SELECT * FROM t0 LEFT JOIN v0 ON v0.c1; -- esimated rows: 10 EXPLAIN SELECT * FROM t0 CROSS JOIN v0; -- esimated rows: 8
The second SELECT returns no smaller number of estimated rows than the first SELECT.
SELECT
The second SELECT returns more.
| Release Version: v6.4.0-alpha-72-g3ef8352a5 Edition: Community Git Commit Hash: 3ef8352a5754606e511ca89292a50612c289a501 Git Branch: master UTC Build Time: 2022-10-14 12:56:17 GoVersion: go1.19.1 Race Enabled: false TiKV Min Version: 6.2.0-alpha Check Table Before Drop: false Store: unistore |
The text was updated successfully, but these errors were encountered:
time-and-fate
No branches or pull requests
Bug Report
The
CROSS JOIN
returns smaller number of estimated rows than theLEFT JOIN
.1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
The second
SELECT
returns no smaller number of estimated rows than the firstSELECT
.3. What did you see instead (Required)
The second
SELECT
returns more.4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: