Skip to content
New issue

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

May be a typo in optimizer's cost formula #59134

Open
winoros opened this issue Jan 22, 2025 · 1 comment
Open

May be a typo in optimizer's cost formula #59134

winoros opened this issue Jan 22, 2025 · 1 comment
Assignees
Labels
sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@winoros
Copy link
Member

winoros commented Jan 22, 2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Image

From the comment, it seems that the tableRows is used to calculate the final network cost of the TableReader side.
So it should use getCardinality(p.tablePlan, ....) as its value.

But in the current codebase, we set it to getCardinality(p.indexPlan, ...).
This could be a typo.

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

current master.

@winoros winoros added sig/planner SIG: Planner type/bug The issue is confirmed as a bug. labels Jan 22, 2025
@time-and-fate
Copy link
Member

Also mentioned in #45077 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants