Choice of primary index for mysql innoDB
- by Saif Bechan
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.