August 11, 2009 at 4:00 am
I have a large table about 8 millions of row and my simple select statement takes more then hour to fetch the data.
SELECT col1, col2, col3, col4, col5
FROM datatable AS tt
ORDER BY tt.col1, tt.col2
I am planning to add covering non clustered index on 2 column in order by clause. Max & min memeory is et to 28 GB & 16 GB. I may not be able to change this query whic is used to compare two table data.
Where to look at and any tips to tune it.
Cheers,
Got an idea..share it !!
DBA_Vishal
August 11, 2009 at 4:52 am
SELECT col1, col2, col3, col4, col5
FROM datatable AS tt
ORDER BY tt.col1, tt.col2
Where/What is "datatable"...is it a SQL table on your server, a table in a linked server, a table you access via ODBC...?
Is this your complete code?....you mention ETL (Extract,Transform,Load)...are you trying to load this data into another table?
regards gah
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
August 11, 2009 at 8:22 am
What are the indexes on the table?
Have you looked at the execution plan (even estimated) as I'd guess the sort is killing performance?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply