If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > duplicate unique key on same column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-08-10, 06:28
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile duplicate unique key on same column

Hi,

in the table structure there is duplicate unique key on same column

as well as key also for that column

UNIQUE KEY `FormID` (`FormID`),
UNIQUE KEY `FormID_2` (`FormID`),
KEY `formtracker_formid_index` (`FormID`),

I think duplicate UNIQUE KEY l make effect on insert performance

Is Index Key on column required as UNIQUE KEY is already applied?
will dropping one of the UNIQUE KEY make insert faster?

Last edited by ankur02018; 02-08-10 at 06:46.
Reply With Quote
  #2 (permalink)  
Old 02-08-10, 08:22
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by ankur02018 View Post
I think duplicate UNIQUE KEY l make effect on insert performance
yes, get rid of the duplicate

Quote:
Originally Posted by ankur02018 View Post
Is Index Key on column required as UNIQUE KEY is already applied?
no, so get rid of this, too
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 02-09-10, 02:17
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile

Quote:
Originally Posted by r937 View Post
yes, get rid of the duplicate

no, so get rid of this, too
Thanks for good suggestion
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On