473,320 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1416
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

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

Similar topics

3
by: Alex Glass | last post by:
I am building a query to select contacts and filter by category. I was wondering if anyone could explain why the first select statement takes 950 times as long to execute compared to the second....
9
by: Igor | last post by:
Is there a way to force optimizer to use indexes without hints? (some server setting or index type...) I'll give an example to clarify : I have a table with fields Customer_Code char(10) not...
12
by: WantedToBeDBA | last post by:
Hi all, db2 => create table emp(empno int not null primary key, \ db2 (cont.) => sex char(1) not null constraint s_check check \ db2 (cont.) => (sex in ('m','f')) \ db2 (cont.) => not enforced...
2
by: UnixSlaxer | last post by:
Hello, I am using DB2-UDB 8.2, when running the design advisor, It exists tells me that "catalog simulation requires that the server be at level V8.0 or newer", although the DB2 version is 8.2...
16
by: romicva | last post by:
I've recently upgraded from 8.1.4 to 8.2.3. System slowed down noticably. Explain shows that indexes are not used. I did reorgs on indexes and tables, collected stats on key fields with detail...
2
by: Keith C. Perry | last post by:
Ok, I've tried a number of things here and I know I'm missing something but at this point my head is spinning (i.e. lack of sleep, too much coffee, etc...) My environment is PG 7.4.3 on Linux...
5
by: Shiraz | last post by:
Is there some manual on how to make indexes? for example: table is create mytable ( a varchar, b varchar, c int, d int
3
by: db2admin | last post by:
hi, our db2advis is broken and i am trying to find other ways to get recommended indexes i tried using command "SET CURRENT EXPLAIN MODE RECOMMEND INDEXES" and it populated ADVISE_INDEXES...
2
by: umair.cheema | last post by:
Hi! 1-I read in MS Access help that Indexes are automatically made when we declare a primary key and they are used for fast searching and sorting purpose. But i am still confused that how can i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.