MySQL Forums
Forum List  »  Performance

Single index or composite indexes?
Posted by: Charlie Siu
Date: March 31, 2005 08:42PM

Hi all,

I designed a table to handle generic form submition:

The field includes userid, formname, fieldname, fieldvalue. In userid, formname, fieldname, they are neither one is unique, but three of them joining together is unique.

The performance is critical to me as in each form, each field will occupy 1 record. so each person submitted a form may generally created around > 30 record.

which one do you think the performance is better? Or any suggestion to me to improve the performance? Thanks in advance!!!

Case 1
----------------
userid primary key
formname primary key
fieldname primary key
fieldvalue


Case 2
-----------------
id primary key
userid
formname
fieldname
fieldvalue

Options: ReplyQuote


Subject
Views
Written By
Posted
Single index or composite indexes?
3179
March 31, 2005 08:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.