batch inserts

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Mar 26 08:54:29 CST 2003


on 3/26/03 7:32 AM, X Y at xyzabc1010 at yahoo.com wrote:

> Hi All,
> There are about 500 records in the table now.
> There are about 6 fields w. only 1 field indexed.
> The OS is Win2K, 256MB, 750 GHz
> 
> I am actually doing the following: I have three tables
> that I am inserting: Session, SessionDetail and
> Activity.
> For each line in a text file, I perform the following
> insert:
>      1. Insert a new activity if one does not exists
>      2. Insert a new Session
>      3. Insert records in SessionDetail (~ 100)
> 
> There are object Pointers referencing to each of the
> table 
> Session --> Activity
>     SessionDetail --> Session
> Therefore, as I create the record, I store its RecID
> to be used in later inserts.
> 
> Is it faster to do an InsertFromAscii?

Yes it is faster, but it is for one table only

> I am using Macromedia Director. With each insert I
> create a cursor, do the insert and void the cursor.

May be you can do not destroy cursors each time?

In any case, I do not see problems in your way.
Must be fast...table small, fields not many...

You can try speed up if
    -- insert 100 records into detail
    -- do UPDATE Ptr  ... WHERE RecID = 0
            this command will assign ObjectPtr for all 100 records.



>> * how many records in table now?
>> * how many fields?
>> * how many cache?
>> * OS ?
>> * hardware?
>> * are you doing flush after each record? Do not do
>> it.
>> * how many fields are indexed?
>> * what data you add: small numbers or strings in few
>> KBs?

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list