BUG: The RB catch of error slows down ENORMOUSLY the app

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Apr 27 20:10:01 CDT 2005


> From: Norman Palardy <palardyn at shaw.ca>
> Date: Wed, 27 Apr 2005 09:50:57 -0600

> If you want to insert only the ones that do not already exist you
> should be able to identify the new records to import with SQL

> Something like
> 
> select id from importTable
> where id not in ( select id from tableToImportInto )
> 
> This will give you the list of ids in the import table that are not
> already in the table you are importing data into
> (That is assuming that Valentina's SQL is quite standard which I
> believe it is)
> 
> At that point you might even be able to use an "insert into" statement
> to insert those rows based on their ID's

Norman,

But generally speaking this is potentially slower way.

Because you at first touch tables/indexed to find record.
Then you again touch tables/indexes to insert.

The Oliver's way will do next:

    touch table/index.
    ONLY in case of not unique key, the exception will be throw.

IF you insert 100,000 records and not stick into error,
    you get only 100,000 touches.

Way you suggest will do 200,000 touches.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list