views:

45

answers:

2

I wanted to know how important it is to use InnoDB table and transactions for an auction website.

I know that when there is payment involved the transactions are important, but in this case, there are only bids placed.

The bids that are placed however are placed very quickly, maybe a few every second.

I was wondering if i couldn't just use the normal MyIsam tables for this problem.

There will be a huge amount of reads and writes every second.

+1  A: 

MyISAM will be quicker, definitely, because it's losing the ACID-compliance that is inherent in InnoDB. I'd do performance benchmarking to make the decision, but I'm more inclined towards InnoDB for this type of system.

Randolph Potter
+2  A: 

MyISAM has serious performance issues with concurrent updates to a single table. So based on that alone, I'd say go with InnoDB.

Transactions are important when you need to ensure an all or nothing behavior for multiple updates to the database. It's quite possible that you can get away without transactions by using the compare and swap technique: read the current highest bidder, if current bid is higher atomically update the record only when the highest bidder hasn't changed, if not updated start at the beginning. But be careful, concurrency is really hard even with transactions, ensuring consistency without them is an order of magnitude more difficult. I'd even go as far as to say that if you have to ask, you're not going to get it correct.

Ants Aasma