Subject Re:Optimize updating of large database
Author Aage Johansen
If there is a high probablilty that the record already exists, you could
just attempt to update it. If the RowsAffected=0, you will try an insert.

Regards,
Aage J.


Johan Kotze wrote:
-------------------------------------------
I have a database of 1 million+ entries and I am looking for the
quickest way of retrieving a record (specified by a unique key
value), change a field in the record (not the key field) and
applying the change to the database. To complicate matters, if the
key does not exist, a new record needs to be added to the database.
I am currently using a TIB_Query component and using TIB_Query.Lookup
to find the record, put the record in edit mode and executing post. I
was thinking along the lines of a stored proc, but how do you
accomplish this in a stored proc.

Any ideas will be much appreciated.
-------------------------------------------