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 relational operators

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


Joined: 25 Feb 2004
Posts: 31
Topics: 16

PostPosted: Wed May 05, 2004 9:46 am    Post subject: DB2 relational operators Reply with quote

Hi,

I have a SQL as below

DECLARE TEST1 CURSOR FOR SELECT CUSTID,CUSTTYPE,LASTPDT FROM TABLE1 WHERE CUSTID>=:H AND CUSTID<:H FOR FETCH ONLY OPTIMIZE FOR 1 ROW


How will >= and < with respect to Range or BETWEEN clause affect??

Does the performance improves if we use IN BETWEEN clause?

Thanks in Advance
John
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed May 05, 2004 10:37 am    Post subject: Reply with quote

Johncwl,

Why don't you run explain for both the statements and then find out which is efficient?

Check this topic ( the last post by me) discusses about EXPLAIN

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

Hope this helps...

Cheers

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