Home » Performance » MySQL » Running query to update million records in the table - best way
Running query to update million records in the table - best way [message #1576] Tue, 07 August 2007 02:19 Go to next message
abhaygupta  is currently offline 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 Go to previous message
Peter  is currently offline 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/
Previous Topic:mysql performance
Next Topic:optimize help for order by
Goto Forum:
  


Current Time: Thu Jul 9 23:39:19 EDT 2009

Total time taken to generate the page: 0.00947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.