http://goo.gl/EmKxy0

Home > ASE > Misconception : sybase query optimizer can not consider index on temporary table if it is created and used in same batch or procedure

Misconception : sybase query optimizer can not consider index on temporary table if it is created and used in same batch or procedure

Misconception: sybase query optimizer can not consider index on temporary table if it is created and used in same batch or procedure.

Fact: When an index is created on a temporary table within a proc, sybase performs a runtime recompilation of the proc in order to make use of the index (if appropriate).

Run the sproc with option “set showplan on” and “with recompile” then we can see the multiple copies of sproc if sproc is having index creation on temp tables after temp table population.

Check the Sybase Wiki @ sybasewiki.com
Categories: ASE Tags:
  1. No comments yet.
  1. No trackbacks yet.