MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

db2 query help

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
vijay
Beginner


Joined: 09 May 2003
Posts: 131
Topics: 64

PostPosted: Wed Aug 31, 2005 8:28 am    Post subject: db2 query help Reply with quote

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
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Aug 31, 2005 8:45 am    Post subject: Reply with quote

Vijay,

Wasn't this question similar to the question you posted 5 days ago?

http://www.mvsforums.com/helpboards/viewtopic.php?t=4733

Did you try out manas's suggestion?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group