View previous topic :: View next topic |
Author |
Message |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Sep 02, 2009 10:04 am Post subject: Which is faster sqlcode 0 or +100 |
|
|
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 |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Wed Sep 02, 2009 10:11 am Post subject: |
|
|
Wouldn't they be the same? Regardless of the presence of an appropriate index? _________________ ....Terry |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Sep 02, 2009 10:39 am Post subject: |
|
|
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 |
|
 |
|
|