Is this a misconception?
Sybase query optimizer can not consider index on temporary table if it is created and used in same batch or procedure.
I'm a bit confused about this as there seem to be differing opinion.
Thanks heaps.
Is this a misconception?
Sybase query optimizer can not consider index on temporary table if it is created and used in same batch or procedure.
I'm a bit confused about this as there seem to be differing opinion.
Thanks heaps.
That's quite simple.
The optimizer calculates the query plan before execution and the temporary table is created when executing the stored procedure.
A way to pass this problem is to create the temporary table and its index before the execution of the stored procedure :)