dont use a single delete statment.
Use a stored proc, loop through and delete record by record and commit for
every 10k. In this way, your mysql will not hang and if you replication
setup, slave also will not lag behind.
regards
anandkl
On Fri, Jun 4, 2010 at 8:40 PM, Brian Dunning
Hi Brian,
I would suggest you to use mk-archiver (Maatkit Tools) for this activity.
http://www.percona.com/files/presentations/Make_Life_Easier_Maatkit_v2.pdf
Regards,
Krishna
On Fri, Jun 4, 2010 at 8:40 PM, Brian Dunning br...@briandunning.comwrote:
Hey all -
I have a table with
Hi Brian-
i think the best way to ensure your dates are using -MM-DD format is for
your dml to reference dates with DATE_FORMAT('-MM-DD','%Y-%m-%d') e.g.
mysql select DEIT_EVENT_SEQUENCE_ID,DEIT_EVENT_STATUS_CODE,DEIT_EVENT_DATE
from DEIT;
I can't help but wonder how this is in any way relevant to the
original question.
On Fri, Jun 4, 2010 at 6:12 PM, Martin Gainty mgai...@hotmail.com wrote:
Hi Brian-
i think the best way to ensure your dates are using -MM-DD format is for
your dml to reference dates with
Brian Dunning wrote:
Hey all -
I have a table with 12,000,000 records spread over about 6 years. I'm trying to
delete all but the last 2 years, but no matter how small of a group I try to
delete at a time, it keeps hanging up the server and I eventually have to
restart MySQL. The table looks