pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Jeff Boes <jboes@nexcerpt.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Long-running DELETE
Date: Tue, 15 Jan 2002 21:13:49 -0800 (PST)
Message-ID: <20020115211207.I39844-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <d40a65a1.0201151102.218752c@posting.google.com>


On 15 Jan 2002, Jeff Boes wrote:

> Okay, this is really starting to fry me:
>
> I'm trying to delete 1000 rows from a table which is referenced by
> several different other tables as a foreign key.  I've turned on
> debug_print_query to help track this down.  When I do deletes from
> some tables, I can delete hundreds of rows per second.  When I delete
> from the main table, it's about 1 row per second.  I've turned off
> every trigger in the database:
>
> update pg_triggers set tgenabled=false;

I don't think tgenabled works.  You'll probably need to set reltriggers to
0 on the pg_class row for the table (and then reset it to the correct
value afterwards).





view thread (5+ messages)  latest in thread

Message-ID: <20020115211207.I39844-100000@megazone23.bigpanda.com>
Permalink:  ../20020115211207.I39844-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020115211207.I39844-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, jboes@nexcerpt.com
  Subject: Re: Long-running DELETE
  In-Reply-To: <20020115211207.I39844-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox