How to tell IUS to use Index ?

How to tell IUS to use Index ?

Post by Gert Brinkman » Sat, 14 Mar 1998 04:00:00


i have a problem that on a SQL-statement an index is not used. Below the
table-schema is shown. By the "unique"-definition an index is implicitly
defined on the three columns (isn't it ?).

create table B
x       integer not null references A1,
y       integer not null references A1,
z       integer not null references A2,
unique(x, y, z)

Now i have a temp table which is created the same way as the table B
(three integer-columns named f, g and h). I want to delete all entries
from table B that are listed in the temp table. Here we go:

delete from B
where row(x ,y ,z)
IN (select row(f, g, h) from temp_tab);

The problem is, that this statements takes a very long time to be
executed. The index is not used, i guess. A select on the same table B
is much faster (less than 1 second), but this statements takes about 20

Is there a solution for this ?

Thank you in advance,


Gert Brinkmann

dimedis GmbH             tel: +49 221 92 12 60 - 0
Habsburgerring 2-12      fax:                  - 99
50674 Koeln