vijay Beginner
Joined: 09 May 2003 Posts: 131 Topics: 64
|
Posted: Wed Aug 31, 2005 8:28 am Post subject: db2 query help |
|
|
Hi ,
I'm coding a CICS screen wherein I've to display all the records on the transaction table.
key - columna + columnb
data - columnc and columnd
and the screen display should be sorted by columnc , columnd ,columna and columnb.
SQL used:
Code: | select
where columnc || columnd || columna || columnb
>= :columnc || :columnd || :columna || :columnb
order by columnc , columnd , columna, columnb |
The logic works fine except that it takes long time to display because it is going thru a tablespace scan.
would it make any difference if I have another index on the table with
columnc , columnd , columna, columnb
the current index is columna and columnb.
Thanks,
Vijay |
|