IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Internal Logic of Executing the Conditions in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sasi Kiran Patha
Warnings : 2

New User


Joined: 19 Nov 2006
Posts: 73
Location: Hyederabad

PostPosted: Fri Jan 19, 2007 6:29 pm
Reply with quote

Hi Guys,

Lets Consider the below Example

Select * from XYZ Table
Where (Cond 1) AND
(Cond 2) AND
(Cond 3) AND
(Cond 4)

Now in the above example lets suppose the execution of COND 1 resulted in the retrieval of Zero records from the table. In that case does the DB2 System Quit with out executing the rest of the Conditions (COND 2, COND 3, COND 4) as the first Condition got failed or it proceeds ahead and Checks for the remaining Conditions also (COND 2, COND 3, COND 4)

Thanks,
Sasi Patha
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jan 19, 2007 9:57 pm
Reply with quote

Sasi Patha,

Unfortunately, or fortunately, it?s not that simple. DB2 analyses your SQL and determines the best approach to satisfying you query. It?s not a top down execution.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Partial Sort conditions for PD fields DFSORT/ICETOOL 16
No new posts Executing DB2 SQL store procedure via... DB2 1
No new posts How to load to DB2 with column level ... DB2 6
No new posts Db2 SQL - how to switch among differe... DB2 18
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:


Back to Top