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

[BUG] estimate_count function should include custom where option #627

Closed
balusarakesh opened this issue Mar 27, 2022 · 1 comment · Fixed by #730
Closed

[BUG] estimate_count function should include custom where option #627

balusarakesh opened this issue Mar 27, 2022 · 1 comment · Fixed by #730
Labels

Comments

@balusarakesh
Copy link

Describe the bug

  • currently the estimate_count function calculates table rows without including the custom --where option provided by the user
  • example: if a table has id column from 1 to 1000 and we want to dump only from 100 to 200, estimates are calculated for the full table. This will have no impact on small tables but can cause serious inefficiencies if the tables have hundreds of millions of rows.
  • We dump tables with --where clause and we noticed that job count in the queue is the same no matter the range of columns we are dumping

To Reproduce
Command executed:

  • run a mydumper for any table with primary key

What mydumper and myloader version has been used?
mydumper 0.12.1, built against MySQL 5.7.33-36

Expected behavior

  • rows are estimated including the --where clause

Environment (please complete the following information):

  • all OS types
@balusarakesh
Copy link
Author

oh wait...including a where clause to the EXPLAIN SELECT is not gonna work because of this... this could be a feature to provide a way to allow users to dump tables for a specific range on a index

@davidducos davidducos added the bug label Mar 28, 2022
@davidducos davidducos added this to the Release 0.12.5-1 milestone Mar 28, 2022
@davidducos davidducos linked a pull request Jun 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants