MySQL Forums
Forum List  »  Performance

Re: What is better? A large query? or too many short ones?
Posted by: KimSeong Loh
Date: November 03, 2005 08:05PM

MySQL is a realtional database that store data in rows, so the fields in a row is stored in sequence, whenever you update 1 field, the whole will be rewritten.

If you update 40 fields in the same row using 1 update statement, the row is only written once.

If you want to update 40 fields of the same row using 40 update statments, the row could be rewritten 40 times, once for each update.

There is no need to combine the 40 fields into a single field, in fact it could be a bad thing to do. You can update many fields in the same row using the same update statement

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: What is better? A large query? or too many short ones?
1235
November 03, 2005 08:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.