Click here to Skip to main content
15,867,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My query is so simple but taking more than 3mins to respond.

please provide solution to reduce time

Here is my query :

SQL
select top 1 * from tr_RequestResponse where premium > 0 order by premium asc


Even i tried min(premium) where premium >0 .
still no use taking long time

What I have tried:

i tried min(premium) where premium >0 .
still no use taking long time
Posted
Updated 27-Apr-16 20:53pm
Comments
Nigam,Ashish 28-Apr-16 2:47am    
How many records you have in your table?
Bernhard Hiller 28-Apr-16 2:59am    
What's the data type of "premium"? Can it be negative?
How long does Select MIN(premium) from tr_RequestResponse where premium > 0 take?
Are the values of "premium" unique, or are duplicates possible?
Member 12456650 28-Apr-16 3:44am    
premium is numeric and does not allow negative value.

duplicates possible only 0.00 is the main duplicate

Select min(premium) where premium >0 is taking so long more than 4 minutes

more than 4lakh records in my table

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900