Subject Re: [IBO] yikes! Help!
Author zifnabbe
Hi,

Just made the update with a stored procedure. It looks like that the
stored procedure doesn't gives that much more speed benefit.

With the TQuery and CachedUpdates = FALSE and locate, insert/update
it was 32 sec
Now with the stored procedurs which handles the insert/update it
takes 29 sec.

Tom.

--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> > Hmm, 4 seconds or less. Would be perfect. But I'm not just
loading a
> table. I need to see if the record exists already in the interbase
table. If
> it exists, then I need to update it, otherwise I need to update it.
If I
> understand your sentence above correctly, with the TIB_DSQL
proposal I can
> only Insert records, not update them if they already exist.
> > Is there another way to mass update a interbase table from another
> database eg Access? (Instead of using Locate each time to check if
the
> record already exists or not)
> >
> > In fact you could look at what I'm trying to do this way:
> >
> > A table from access is offered to the program. Then we need to
push that
> data in an interbase table. Already existing records need to be
updated and
> new records need to be added. So you can see the interbase table as
the
> table which contains all the records and contains the latest
information,
> while the Access table only contains new or updated data.
>
> Well, instead of using an insert statement directly use a stored
procedure
> that receives all the values of each record. Then, inside the stored
> procedure do all the checks necessary to insert or update as
appropriate.
>
> There should be a FAQ or message in the archives on this where I've
given a
> more detailed way to do this efficiently.
>
> Using a proc is your best bet here.
>
> PS. Get some sleep and do it in the morning. G'nite.
>
> Regards,
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com