Subject RE: [IBO] Big Batch...
Author Christian Kaas
If done right the whole thing shouldn't run any longer than a few
seconds (i tried a little benchmark against my linux server PII 350
512MB RAM, UDMA/66 IDE drives) and it took only a few seconds for ten
thousands of records in a table with more than one attribute!
use tib_dsql with parameters and use the prepare methode once, and
execute the sql then in a loop.

something like:

>- snip------------------------------------------
with yourib_dsql do
begin
sql.clear;
sql.add('INSERT INTO SYMBOLS (SYMBOL) VALUES (:val)');
prepare;
while true do
begin
newSymbol := gettickerSymbol; // assumed this is a function returning
a string with the next symbol
if newSymbol = '' then
break;

Parambyname(':val').asstring := gettickerSymbol;
ExecSQL;
end;
end;

>-----------------------------------------------------

This will ROCK your instance and be THE FASTEST way!

Regards

--
Christian Kaas mailto:christian@...
Client/Server/Internet/Multitier development
http://www.ckaas.de

> -----Ursprungliche Nachricht-----
> Von: Admin [mailto:dkeith@...]
> Gesendet: Freitag, 16. Marz 2001 02:58
> An: IBObjects@yahoogroups.com
> Betreff: [IBO] Big Batch...
>
>
> I am downloading the symbol lists for the 4 major american stock
> exchanges. This list grows in size every day, currently over 14,300
> symbols. I then parse out the symbol data and insert it into a single
> column(CHAR), unindexed table in IB6. The only way I yet know
> how to do
> this is with an INSERT INTO SYMBOLS (SYMBOL) VALUES (val); statement
> that inserts one row at a time, using an IB_Connection & TIBOQuery.
>
> I've tried various approaches such as dividing up the list
> into chunks,
> and then using several threads to insert the data. This would speed up
> the process a little, but I keep getting 'Error reading data from
> connection' or 'Error writing data to connection' or something like
> that.
>
> I would like to do this as quickly as possible. Any ideas?
>
> TIA.
>
> David Keith
>
> [Non-text portions of this message have been removed]
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-~>
> Make good on the promise you made at graduation to keep
> in touch. Classmates.com has over 14 million registered
> high school alumni--chances are you'll find your friends!
> http://us.click.yahoo.com/l3joGB/DMUCAA/4ihDAA/P0AVlB/TM
> --------------------------------------------------------------
> -------_->
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>