Home » Performance » MySQL » InnoDB DELETE/INSERT vs. UPDATE in transaction
InnoDB DELETE/INSERT vs. UPDATE in transaction [message #1317] Fri, 25 May 2007 09:51 Go to previous message
puzzles  is currently offline puzzles
Messages: 2
Registered: May 2007
Junior Member
Hi,

I have an InnoDB table with approximately 300 rows, which is regenerated every 3 seconds. (This is a redundant statistics table for a website with a *very* heavy load.)

Right now, the generation of the table is done in a transaction by deleting all rows and then inserting all necessary new ones. My question is, would it be faster (does it make any difference at all) to not DELETE/INSERT the rows, but do an INSERT ... ON DUPLICATE KEY UPDATE query and then delete the rows that were unaffected by this operation (and thus, are now obsolete)?

Thanks.

Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:DISTINCT vs GROUP BY
Next Topic:MyISAM to INNODB..
Goto Forum:

  


Current Time: Fri Jul 10 03:31:58 EDT 2009

Total time taken to generate the page: 0.02132 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.