Fri Oct 26 05:54:56 PDT 2007
- Previous message: [Slony1-general] VALUES () ... ();
- Next message: [Slony1-general] VALUES () ... ();
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Oct 26, 2007 at 08:37:08AM +0100, Simon Riggs wrote: > On Thu, 2007-10-25 at 19:59 -0700, David Fetter wrote: > > > Does Slony-I 2-to-be use INSERT ... VALUES (...), ..., (...); to pass > > INSERTs? It seems to me this would be quicker than a flock of > > single-tuple INSERTs, and since we're having flag day with 8.3, we're > > guaranteed the feature is there. :) > > It's not easily possible to do this because each invocation of the log > trigger has a different set of values and they can't see each others > values. > > It could be possible to do this on the apply side by saving up data from > log table row to row until we can issue a single mega-INSERT. But if we > were going to do that, why not initiate a COPY, which would handle the > bulk cases even better? The difficulty would be in deciding what the > logic should be to invoke the special case SQL construction. Maybe an AFTER trigger per-statement for INSERTs? Cheers, David. > > Another thought: I notice that Slony writes out all of the column names > for each insert e.g. (col1, col2, col3) VALUES (x, y, x) > > It would be straightforward to remove the (col1, col2, col3) text from > each INSERT statement since that is optional. That would reduce the > overhead of each INSERT row and reduce the parsing time on the other > side also. > > -- > Simon Riggs > 2ndQuadrant http://www.2ndQuadrant.com -- David Fetter <david at fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter at gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
- Previous message: [Slony1-general] VALUES () ... ();
- Next message: [Slony1-general] VALUES () ... ();
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list