fletchsod
Programmer
- Dec 16, 2002
- 181
Quick question here!! I have are
The primary key is SESSION_ID. Since SESSION_ID is automatically indexed due to primary key. Suppose I add the USER_ID to the existing index that include the primary key, would it still work? Or do I have to make a seperate index for "USER_ID"?
Thanks..
Code:
.. FROM SESSIONS WHERE SESSION_ID = '***'
.. FROM SESSIONS WHERE SESSION_ID = '***' AND USER_ID = '***'
.. FROM SESSIONS WHERE USER_ID = '***'
The primary key is SESSION_ID. Since SESSION_ID is automatically indexed due to primary key. Suppose I add the USER_ID to the existing index that include the primary key, would it still work? Or do I have to make a seperate index for "USER_ID"?
Thanks..