Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

What is most efficient way to index innodb so can select on either of two fields (2 replies)

$
0
0
Hi,

Newbie question.

I have an innodb with 2 columns in the table, szEmailAddress and szCustomerID.

I need to select either by szEmailAddress or szCustomerID efficiently as the DB will be quite large.

The szEmailAddress column is unique and will be the one normally used to select.

What would be the CREATE TABLE syntax to index on each of the fields in the most efficient way.

Thanks,

Jan

Viewing all articles
Browse latest Browse all 1957

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>