469,128 Members | 1,559 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,128 developers. It's quick & easy.

indexes and query optimization

I have web page that users use to specify sort and selection critieria for a query. So there is a "most common" type set of where clauses, but they can change. Every time the query is run, there are where clauses on multiple columns, and joins from some columns to other tables, and then it is sorted by a different column.

I am wondering if I should have a clustered index on this table since there are so many columns used in where clauses. Would it be useful to cluster on the column it is sorted by, or should I just stick with nonclustered indexes?
Thanks
Apr 3 '07 #1
1 1344
iburyak
1,017 Expert 512MB
If you have sort order by different columns, clustered index will not help.
You can have only one clustered index over a table.
But you can still have none clustered indexes over columns you do order by over.
Apr 3 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Alex Glass | last post: by
9 posts views Thread by Igor | last post: by
2 posts views Thread by UnixSlaxer | last post: by
16 posts views Thread by romicva | last post: by
2 posts views Thread by Keith C. Perry | last post: by
5 posts views Thread by Shiraz | last post: by
3 posts views Thread by db2admin | last post: by
2 posts views Thread by umair.cheema | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.