471,594 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

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 1376
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
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.