hello,
Thanks for making it clear.
i have seen the source code of Query::insert(iter, iter). It is doing
the same what you are proposing.
If i build INSERT statement myself , then the problem is that i have
to do conversion from different datatypes to string.( for example from
datetime to string ).
Which ofcourse will be a overhead.
Query::insert(iter,iter) handle this overhead problem a little bit
differently.It writes all the values directly to a stream. And then
passes the stream to server for processing.
with best regards,
Imran Siddiqui
On 4/5/07, Warren Young <mysqlpp@stripped> wrote:
> a b wrote:
> >
> > If "Prepare Statement" do not work according to the performance
> > required then probably i shall explore the source code of LOAD DATA
> > INFILE.
>
> We're not proposing using prepared statements. Dragomir's suggestion is
> to simply insert multiple rows' worth of values in a single INSERT
> statement. This optimization helps because there are fewer round-trips
> to the database server.
>
> All you have to do to try this is modify how it builds the INSERT
> statement in Query::insert(iter, iter), adding multiple value sets per
> statement. For testing, I'd probably hard-code the number of rows per
> insert, and simply see if it helps. We can get clever later.
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe: http://lists.mysql.com/plusplus?unsub=1
>
>