List:MySQL++« Previous MessageNext Message »
From:M Imran Siddiqui Date:April 5 2007 9:52am
Subject:Re: bulk insert optimization required
View as plain text  

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
> 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:
> To unsubscribe:
bulk insert optimization requireda b4 Apr
  • Re: bulk insert optimization requiredMr.Dragomir Stanchev4 Apr
    • Re: bulk insert optimization requiredWarren Young5 Apr
      • Re: bulk insert optimization requireda b5 Apr
        • Re: bulk insert optimization requiredWarren Young5 Apr
          • Re: bulk insert optimization requiredM Imran Siddiqui5 Apr
            • Re: bulk insert optimization requiredWarren Young6 Apr