Improving performance of view

Improving performance of view

Post by Martin Haltmaye » Thu, 23 Oct 1997 04:00:00



Define a table RANGES as

-- LOWER and UPPER should be the same type like KSTAR.
create table RANGES (LOWER ..., UPPER ...);

insert into RANGES values (:A10, :A11);
insert into RANGES values (:A12, :A13);
...
insert into RANGES values (:A34, :A35);
insert into RANGES values (:A36, :A36);
insert into RANGES values (:A37, :A37);
...
insert into RANGES values (:A57, :A57);

select ...
from COVP, RANGES
where ...
and KSTAR between LOWER and UPPER;

Give it a try.

Martin Haltmayer