Jan Wieck JanWieck
Tue May 24 13:43:25 PDT 2005
On 5/24/2005 8:36 AM, Sven Willenberger wrote:

> On Tue, 2005-05-24 at 07:09 -0400, Andrew Sullivan wrote:
>> On Mon, May 23, 2005 at 05:06:18PM -0400, Sven Willenberger wrote:
>> > 
>> > I guess my question is, when only one of the fields of the primary key
>> > is used as a condition for a delete statement, is there a way to have
>> > slony issue just that simple command rather than expand the statement to
>> > include all the columns of the primary key?
>> 
>> No.  What you seem to want is SQL capture-and-ship.  pgpool does
>> something like that.  The only thing you're paying extra for is the
>> network, note: your single-condition DELETE really is touching every
>> row, and all of those statements will go to the replica at once,
>> because they're part of a single write set (having all occurred in
>> the same transaction).
>> 
>> A
>> 
> I realize now looking at the Slony trigger that indeed, the only way
> this could work currently is row by row (since the trigger is in fact,
> "for each row"). I guess I need to look at why deleting 300k rows took
> so long (like an hour) on a system consisting of dual opterons and 8GB
> of RAM ...

Do you vacuum and analyze the replica on a regular base?


Jan


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list