optimizer is not using the correct query plan
Posted on 2006-07-20
I have a problem with a query that is not using the correct query plan and this is causing the stored proc to get stuck at a particular point. I have the same stored procedure on 2 systems, production and uat. When I look at the query plan in uat it is correct. However when the same stored procedure is executed in production the query plan is not correct. There is a join that is not executed in the right order. What could be causing this ? Co-incidentally another error appeared in my logs at the same time this problem occured:
Err Description: [SYBASE][OLE DB Sybase provider]Sybase does not allow more than one active statement when retrieving results without a cursor.
May not be related though but i'm guessing it is.