MySQL performance DELETE or UPDATE? -


I have a MyISAM table with more than 10 7 rows. Adding the data, I have to update ~ 10 rows at the end, do they want to remove them faster and then insert new ones, or faster to update those rows? The data that needs to be updated is not part of the index. About index / data fragmentation

UPDATE is pretty fast.

When you UPDATE , the records in the table are being rewritten with the new data.

You should be indexed by DELETE , up to date (remember, you delete the entire row, not only you need to modify the columns) and the datastock can be transferred. (If you press PCTFREE limit]

and all this should be done again on INSERT .

This is the reason That you should always use a duplicate key update in

  INSERT ... >  instead of  
 

< / P>

An Important In the case of violation, there is an earlier UPDATE operation, while the latter one delete / INSERT .


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -