Simon Riggs simon at 2ndquadrant.com
Mon Jan 28 04:32:45 PST 2008
On Mon, 2008-01-07 at 12:43 -0500, Christopher Browne wrote:

>   1.  Some processing load gets taken off the provider
> 
>       The "LOG cursor" query becomes a "COPY [foo] to stdout" query,
>       and it's worth noting that we lose the need to have an ORDER BY
>       clause, which eliminates a sort.

If you define the cursors as NO SCROLL it will improve larger sorts.

>   3.  We use COPY to load data onto the subscriber
> 
>       There are two very large benefits to this, in that:
>        i) COPY should be *WAY* faster than the INSERT presently used;
>        ii) We can COPY in specific-sized-buffer chunks, which eliminates
>            the somewhat-overly baroque code that tries to limit slon
>            memory usage.

Why not allow a table-specific pair of log tables? These would be
dedicated just to that table, completely separate from the general
table. That way a large INSERT-heavy table could isolate its data from
other tables, allowing a COPY just on that table, though 

That way you aren't changing the underlying mechanisms, which work
nicely, but allow a different route for large INSERT-heavy tables, which
are likely the main cause of problems in this area.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com



More information about the Slony1-general mailing list