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 

Which is faster sqlcode 0 or +100

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


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Sep 02, 2009 10:04 am    Post subject: Which is faster sqlcode 0 or +100 Reply with quote

Have an 'option' db2 table.
Select performed for row.
If sqlcode = 0 then values from row are used.
If sqlcode = +100, then program populates values.

so which select will return from db2 quicker, the sqlcode 0 with data or +100 without any data?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Wed Sep 02, 2009 10:11 am    Post subject: Reply with quote

Wouldn't they be the same? Regardless of the presence of an appropriate index?
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Sep 02, 2009 10:39 am    Post subject: Reply with quote

dbzTHEdinosauer,

I would define the column with null and use IFNULL/VALUE/COALSCE on the column and retrieve the default value with sql code being always zero.


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