
July 1st, 2004, 08:55 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
SQL Server - Wrong Execution Plan
When accessing a stored procedure via ODBC and c++ the execution plan of stored procedues
can sometimes be incorrect resulting in long query execution times. However when run through sql query analyzer the
query execution plan is correct and the query returns the results in the time expected. The only way around this problem is
to add the option (force order) to the bottom of the query in question. What we cant understand is why through c++ and sql the
query execution is wrong but through the analyzer it is correct. Any ideas would be appreciated, thanks,
|