MyISAM v InnoDB locking

Hi

I have been reading about the differences between MyISAM and InnoDB and my main concern is table locking. What is best for an ecommerce site e.g. many orders being placed so many inserts into DB.

I have a concern of two orders being placed at the same time and one will lock the table and forbid access to the other query, when this happens what is the outcome with MyISAM?

Thanks

Great - thanks for the responses, I was concerned MYISAM may reject deadlock is encountered.

Is InnoDB regarded as the best for a high hit e-commerce site?

Thanks

the second one waits until the first one is finished

Which unless you manage to create a deadlock will only be a small unnoticeable fraction of a second.

In both cases an insert shouldn’t have any issues with regard locking.

The main benefit of innodb is that it allows transaction processing so that if you have several related inserts/updates that you can set them up as a transaction and have either all of them or none of them apply because it will rollback the changes if they don’t all complete. With myisam each database call stands alone and if you have related inserts/updates and one fails then your data is corrupted until you have correct it either in your own code or manually.