Is the execute plan the way which sybase actually execute the sql? -
01-06-2011
, 11:43 PM
I am using sybase sql advantage. There is a non-cluester index with
columns(idc1, idc2) in the table.
SELECT c3, c4, c5
FROM the_table
WHERE idc1=10000
AND idc2=20000
Below is the execute plan of the SQL
STEP 1
The type of query is INSERT.
The update mode is direct.
Worktable1 created, in allpages locking mode, for DISTINCT.
FROM TABLE
the_table
Nested iteration.
Table Scan.
Forward scan.
Positioning at start of table.
Using I/O Size 16 Kbytes for data pages.
With MRU Buffer Replacement Strategy for data pages.
TO TABLE
Worktable1.
STEP 2
The type of query is SELECT.
This step involves sorting.
FROM TABLE
Worktable1.
Using GETSORTED
Table Scan.
Forward scan.
Positioning at start of table.
Using I/O Size 16 Kbytes for data pages.
With MRU Buffer Replacement Strategy for data pages.
Why this SQL don't use index? What should I do to use an index for
this SQL? |