That is, consider this scenario: Is the key I am about to insert
already there? Lookup the key value. Not found, so let's insert.
Argh! Duplicate key error on the write!
Thus since the code likely needs to handle the duplicate key error
irrespective of this advance lookup having been coded to ensure the key
value does not exist, then how much value was there in checking first in
the application? Is it purely overhead? Perhaps just perform the
insert and handle the exception only if\when it occurs.?
This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact