|
-
I think you are asking which column to index in a table. This mainly depends on the types of queries you issue against the tables. It is beneficial to index the columns used mostly in the Where clauses. Also you need to explore if there are several columns used in the where clause, so you need to figure out if you need to index more than one column.
Primary Key columns are automatically indexed. Its a good idea to index columns used in Joins & foreign keys. Also try to figure out if your queries are running slow & explore the possibility if indexing might help.
Also before deciding to index the column or not try assessing the kind of data & the frequency of data i.e the cardinality & selectivity of an index.
Tansdot
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
|