| Running query to update million records in the table - best way [message #1576] |
Tue, 07 August 2007 02:19  |
abhaygupta Messages: 1 Registered: August 2007 Location: India |
Junior Member |
|
|
Hi all,
I have a table with 6 fields. Index is implemented on 2 fields - ArticleId and CategoryId, which also form the composite primary key.
The table has more than a million records and we need to run updates on it every 10 minutes.
Please advice what is the best way to run an update query so it takes the least possible time.
Best regards,
Abhay Gupta
|
|
|
| Re: Running query to update million records in the table - best way [message #1593 is a reply to message #1576 ] |
Thu, 16 August 2007 08:06  |
Peter Messages: 405 Registered: August 2006 |
Senior Member Super Guru |
|
|
Is it MyISAM or Innodb ?
I would first think if you really need to do it as it sounds nasty and would not scale well.
When you need to get table into memory and make sure update is well indexed and amount of extra indexes is kept to minimum.
Peter Zaitsev, MySQL Performance Expert
MySQL Performance Blog - http://www.mysqlperformanceblog.com
MySQL Consulting http://www.mysqlperformanceblog.com/mysql-consulting/
|
|
|