Subject Re: [IBO] ib_query slow copy 300.000 records.
Author Thomas Steinmaurer
>> i am using TIB_Query for import data from dbf (300.000 records)
>>
>> every 10000 i do hard commit, after 100.000 records looping go very slow.
>> for dbf i am using TQuery.
>>
>> slow i mean for 300.000 records i spent 3 hours.
>> how to speed up?
>>
>> please help, thanks.
>
> The following might help:
>
> * Use a uni-directional component like TIB_Cursor instead of TIB_Query
> * Set TQuery to uni-directional as well
> * Use a parametrized query in TIB_Cursor and assign the parameter values
> in your loop

Trying once more, because to above is almost non-sense. ;-)

If TQuery is used to iterate through your records in the dbf table from
the beginning to the end, then set Unidirectional to true.

Use a TIB_DSQL for the insert process, by using a parametrized INSERT
INTO statement, prepare the statement outside your loop and set the
parameter values in your loop and execute the INSERT INTO statement.

Do regular hard commits on TIB_DSQL.

HTH.


--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/