Choice of primary index for mysql innoDB
Posted
by Saif Bechan
on Stack Overflow
See other posts from Stack Overflow
or by Saif Bechan
Published on 2010-03-21T15:15:54Z
Indexed on
2010/03/21
15:21 UTC
Read the original article
Hit count: 336
I have an auction website where users can place a bid on a product. Now i have a primary index on the bid table for easy access of the last places bid on the product. This index is just a unique auto incrementing value. During the week this number becomes huge!!
I was wondering if this is a good setup for the primary key in an innoDB table.
The bids table exist of the following important fields:
table: bids fields: user_id,product_id,bid
So what i want to do is make the primary of these 3 fields combined. Is this a good idea or is this just too much for innoDB keys.
© Stack Overflow or respective owner