Just one quick response...
> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Luis Fernando Muñoz Mejías
> Sent: Friday, April 17, 2009 5:13 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] RFC: On rsyslog output modules and support
> forbatchoperations
>
> Hi,
>
> > I am thinking on how to enhance the engine so that fastest-possible
> > database writes (actually, any output) are possible. However, I come
> > across a couple of points. I would like to do so in the most generic
> > way. Let me quote those message parts that I have specific questions
> > on (out of sequence, thus I preserve the full message below - if you
> > need more context).
> >
> > > I made a small Python prototype to do something similar to what you
> > > propose, with no batches, but committing each 1000 entries. The
> > > speedup I got by introducing batches was about a factor 50. And the
> > > statement was already prepared.
> >
> > Could you check what actually brings most of the speedup - the
> batches
> > or the prepared statement. I am thinking along the lines of using
> > batches but not prepared statements, as in this sample
> >
> > begin insert ... insert ... insert ... insert ... end
>
> I'll do, but please note that
>
> begin
> execute(unprepared_insert_statement)
> execute(unprepared_insert_statement)
> execute(unprepared_insert_statement)
> execute(unprepared_insert_statement)
> commit
>
> Needs 4 message exchanges with the server.
Mhhh... I don't agree here. My sequence was different ;)
execute("begin; insert ... ; insert ... ; insert ... ; commit;");
The key is that all statements are passed in via a single execute call. I
don't know about Oracle, but this is possible with MS SQL (out of past
experience) and Postgresql (tested to some extent today). Note sure about
MySQL either, but I think it supports it. I also mean that I have heard
(really long ago) that Oracle should support it, too - but you know better
than me.
To pinpoint my question: I am specifically asking about multiple statements
WITHIN a single SQL statement execution call.
Rainer
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com