"I only ever access the table while searching using WHERE User1='' AND User2=''."
In this case you want an index on User1 and User2 (combined, not one on user1 and one on user2).
A clustered index would be great, but maybe you need it for the primary key (do you have one? What is it?).
Show differencesHistory of post edits
#2LorenzoGatti
Posted 25 December 2012 - 01:58 AM
<blockquote class="ipsBlockquote"><p>EG: Table name = Object<br />Object has two FK's: User1, User2<br />I only ever access the table while searching using WHERE User1='' AND User2=''.</p></blockquote>In this case you want an index on User1 and User2, combined.<br />A clustered index would be great, but maybe you need it for the primary key (do you have one? What is it?).
#1LorenzoGatti
Posted 25 December 2012 - 01:57 AM
<blockquote class="ipsBlockquote" data-author="Uthman" data-cid="5013831"><p> EG: Table name = Object<br />Object has two FK's: User1, User2<br />I only ever access the table while searching using WHERE User1='' AND User2=''.</p></blockquote>In this case you want an index on User1 and User2, combined.<br />A clustered index would be great, but maybe you need it for the primary key (do you have one? What is it?).