|
-
Dec 9th, 2003, 05:14 AM
#1
Thread Starter
Frenzied Member
SQL Server Indexes
I'm going to try indexing tables in SQL Server for the first time. I need some advice as to the best method.
Firstly I have three tables containing location data (state, city, district):
tbl_lookup_state
ID int(4) Identity NOT NULL
state_desc varchar(50) NOT NULL
tbl_lookup_city
ID int(4) Identity NOT NULL
stateID int(4) NOT NULL
city_desc varchar(50) NOT NULL
tbl_lookup_district
ID int(4) Identity NOT NULL
cityID int(4) NOT NULL
district_desc varchar(50) NOT NULL
Queries on these tables is always by ID. They are then subsequently sorted by the text description field.
Is it best to use clustered indexes on the ID field?
I also have another table that holds far more information and can be queried against multiple fields - does this need an unclustered index?
Advice on this for a newbie would be appreciated.
DJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|