Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Rekha
Starting Member
14 Posts |
Posted - 2008-04-24 : 08:38:46
|
| Hi,I have a query as mentioned below:SELECT BillCurrencyID,DistD,Amount,PartnerFlag1 FROM Factsales_tab_Dtls (NOLOCK)WHERE (sales_year =2007 OR sales_year=2008)AND Country ='US'1) Table Factsales_tab_Dtls is having more than 5.5 million of records.2) It is having 32 columns.3)There's nonclusetered index on columns sales_year & country4)The query takes longer time for executionPlease help me fine-tune the query |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-24 : 08:49:24
|
[code]SELECT BillCurrencyID, DistD, Amount, PartnerFlag1FROM Factsales_tab_Dtls (NOLOCK)WHERE Sales_Year >= 2007 AND Sales_Year <= 2008 AND Country = 'US'[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|