Forum Moderators: open

Message Too Old, No Replies

Is a MySQL unique index enough? Or do I need a regular index also?

Will a unique index speed up the WHERE clause of a query?

         

erikcw

8:32 pm on Mar 8, 2007 (gmt 0)

10+ Year Member



Hi all,

I have a field in my MySQL that has a UNIQUE index. I'm going to be using this field a lot in the WHERE clause of my queries, and I was wondering if I need to also add a regular index, or will the unique index fill double duty?

Thanks!
Erik

justageek

2:32 am on Mar 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It will be fine. The only difference between the two is the unique part of it.

JAG