pt-table-checksum SELECT MIN MAX for char chunking is wrong
Bug #821688 reported by
Daniel Nichter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
High
|
Daniel Nichter |
Bug Description
Imported from http://
The code does "SELECT MIN(id), MAX(id) FROM `db`.`table` ORDER BY `id`" but Baron says:
The query doesn't really make sense. MIN() and MAX() will return a single row, so the query is really a GROUP BY over the whole table; therefore ORDER BY is not needed (you can't order a single row). Is that ORDER BY what's causing the problem? Otherwise, MIN and MAX from an index should be really fast -- we should see "SELECT tables optimized away" in the Extra column of EXPLAIN.
Changed in percona-toolkit: | |
milestone: | none → 1.0.1 |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Daniel,
I think we should simply remove the chunking code and change the tool to using Nibble. I'll post my ideas about this elsewhere.