Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing a query
Message
 
 
To
09/09/2008 09:23:13
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 6.5 and older
Miscellaneous
Thread ID:
01345942
Message ID:
01346041
Views:
10
>>Strange. I don't see a difference between these two queries except for explicit amount in the second case. So, could it be that it is implicit conversion of the parameter?
>>
>>How Amount field is defined in the table and how is @Amount defined? Is it a direct query or an SP? Did you try to measure performance difference between query and SP? Also you can move Amount condition into the JOIN but I doubt it will change anything.
>
>Amount was used as an example. In the real code, it is an integer. It is a direct query. As you may have read in this thread, I have used the sub query approach. I will see how it goes.

What is the exact problem here - the inclusion of the second table field with parameter? I don't understand how would subquery help you. SQL Query optimizer should be smart enough by itself.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform