Link to home
Start Free TrialLog in
Avatar of TDK777
TDK777

asked on

index problem

i have a table: user_friends with: userid int, friendid int... now i do select * from user_friends where userid=2 or friendid=2, i have primary key(userid,friendid), index(friendid), but that query uses no index, why??
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial