Add option --no-force-primary to pt-archiver tool

Bug #1450951 reported by Sveta Smirnova
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Medium
Carlos Salguero

Bug Description

Sometimes using primary key works much slower for pt-archiver. Example is huge table and option --where="non_unique_key=4350" specified. In this case it is possible that if primary key search used MySQL server will do full table scan while choose better plan if non_unique_key used. However by default pt-archiver forces primary key. Although workaround (specify option i=non_unique_key) exists it is not very convenient when you want to archive more than one table.

So creating this feature request: please add option --no-force-primary to pt-archiver tool which would not add any FORCE INDEX clause and let MySQL server to choose the best plan.

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Version 2.2.14

Changed in percona-toolkit:
status: New → Confirmed
tags: added: i64378
Changed in percona-toolkit:
importance: Undecided → Medium
assignee: nobody → Frank Cizmich (frank-cizmich)
tags: added: pt85
Changed in percona-toolkit:
assignee: Frank Cizmich (frank-cizmich) → Carlos Salguero (carlos-salguero)
Revision history for this message
刀尖红叶 (leafonsword) wrote :

I also encounter a case where no-primary key scan is alot faster, hope support "--no-force-primary" soon!

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-681

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.