The SQL is on join between a view & a table. The SQL is at the end of thsi message!
The index is on the table and its a regular index.The operating system is Windows.
Yes. I had executed the command RUNSTAT on indexes.
What I observe from the access plan is that the index which exists on that table- column was used by version 7 whereas its not being used by 8 and so there is an increase in the cost. I notice whenever there is a NLJOIN on the two cloumns the cost difference is huge between the two versions.
Select view.Col1, cas.c1, cas.c2,view.c3,
view.c4, view.c5, view.c6, view.c7,
view.c8, view.c9, view.c10, view.c11,
view.c11, view.c12, view.c13
from VIEW view,TABLE cas
where view.c1 IN (0, 4)
and view.c2 IN( 12397, 12398, 12399, 12400, 12403, 12404, 12405,
12406, 12407, 12408, 12409, 122910, 122911, 122912, 122913, 122914, 122915,
122916, 122917, 122918, 12420, 12421, 12422, 1229123, 1229124, 1229125, 12426,
12427, 12428, 12429, 12430, 12431, 12432, 12433, 12434, 12435, 12436,
12437, 12438, 12439, 12440, 124291, 12442, 12443, 12444, 12445, 12446,
12447, 12448, 12449, 12450, 12451, 12452, 12453, 12454, 12455, 12456,
12457, 12458, 12459, 12460, 12461, 12462, 12463, 12464, 12465, 12466,
12467, 12468, 12469, 12470, 12471, 12472, 12473, 12474, 12475, 12476,
12477, 12478, 12479, 12480, 12481, 12482, 12483, 12484, 12485, 12486,
12487, 12488, 12489, 12490, 12491, 12492, 12493, 12494, 12495, 12496,
12497, 12498, 12499, 12500, 12501, 12502, 12503, 12504, 12505, 12506,
12507, 12508, 12509, 12510, 12511, 12512, 12513, 12514, 12515, 12516,
12517, 12518, 12519, 12520, 12521, 12522, 29101, 29102, 29103, 29104,
29105, 29106, 29107, 29108, 29109, 29110, 29111, 29112, 29113, 29114,
29115, 29116, 29117, 29118, 29119, 29120, 29121, 29122, 291123, 291124,
291125, 29126, 29127, 29128, 29129, 29130, 29131, 29132, 29133, 29134,
29135, 29136, 29137, 29138, 29139, 29140, 291291, 29142, 29143, 997510)
and view.c2= ?
and view.c3 = ?
and view.c4 = ?
and view.C1 = cas.C1
and view.C2 = cas.c2
and cas.c5 = ?
and cas.c6 IN( 'A', 'D')
and ((cas.c6 <> 'D')
or (cas.c7 > CURRENT DATE))
order by view.c3, view.c4, view.c5, view.c6, view.c7, view.C8