Subject RE: [IBO] Another Self Exercise
Author Josipovic, Nikica
Best done with DSQL...use a parametrized insert-statement, prepare it, and loop this:
set the parameters and call execute

This is extremely fast, and if you commit your transaction only every x-loops (e.g. every 10k records), you'll get brilliant results. The parameters are variants, so take care what you assign to what....

the Query has more overhead to this and will slow the insertion down pretty much.

CU,

Nick Josipovic
Business Analyst
Corporate Market Intelligence
Global Communications
SAP AG
Neurottstrasse 16
69190 Walldorf
T +49 6227 762945
F +49 6227 7834457
E nikica.josipovic@...
<http://www.sap.com/germany>



> -----Original Message-----
> From: Malcolm Smith [mailto:mjfreelancing@...]
> Sent: Tuesday, August 20, 2002 12:48 PM
> To: IBObjects List
> Subject: [IBO] Another Self Exercise
>
>
> I want to write a small console application (or GUI) just for
> more playing
> purposes.
>
> I want to write 100,000 records into a database - speed test type
> application.
>
> 1. Is this best done with a TIB_Query ?
>
> 2. Do I create all the records in one long loop ?
>
> 3. Do I have to commit every N records to gain performance ?
>
> There's no practical purpose for this exercise apart from my
> own personal
> desire to understand as much about SQL databases and the
> implementation of
> IBO in various situations.
>
> TIA.
>
>
> Malcolm Smith
> MJ Freelancing
> http://www.mjfreelancing.com
> C++Builder Software Protection
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> 4 DVDs Free +s&p Join Now
> http://us.click.yahoo.com/pt6YBB/NXiEAA/Ey.GAA/PhFolB/TM
> --------------------------------------------------------------
> -------~->
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>