Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 18534650E8A for ; Fri, 4 Jul 2008 04:17:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84740-04 for ; Fri, 4 Jul 2008 04:17:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by postgresql.org (Postfix) with ESMTP id 2EFCA650E23 for ; Fri, 4 Jul 2008 04:17:45 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id d30so241263and.33 for ; Fri, 04 Jul 2008 00:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=H0DIadYW7P49f6KjHN5PMayy5mQBQoc+8b4RESd9WXQ=; b=aGjtgYhs8t0M/FK7DK6BLl4ZwstMZfiDEUjnnZBOZF5wIPOrnqsmOYxnXCapbBiaAR jgLJ4ZSehLqziNaW018jfKUW8XVWui54mfMYts8EcZ51QUxJvWOnt15nxBT6mKgZgoNt dKadaNvn5dFGdWahy2QnRjRmxgTDr7oMSa9qw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=slgmEUOhrEEBVjDUBrdHzJhLmR8p4lJ/8lQJt+E6WIHT0H7Gr12cAI+vaBRCTyMySE a+SlePZQx/kyAMuPHrvgF32sQn6ULMAV9lL7agCx4bBHMjvYUBh2gpW7ZwAHcbTyuJuS pE1r71UCZKQKWBiIoA7X0j6PCiweZDadrS4AU= Received: by 10.100.31.3 with SMTP id e3mr177021ane.21.1215155864251; Fri, 04 Jul 2008 00:17:44 -0700 (PDT) Received: by 10.100.172.18 with HTTP; Fri, 4 Jul 2008 00:17:43 -0700 (PDT) Message-ID: Date: Fri, 4 Jul 2008 17:17:43 +1000 From: "Charles Duffy" To: "Jessica Richard" Subject: Re: slow delete... Cc: pgsql-admin@postgresql.org In-Reply-To: <695185.47881.qm@web56409.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <695185.47881.qm@web56409.mail.re3.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/62 X-Sequence-Number: 29672 > by the way, there is a foreign key on another table that references the > primary key col0 on table test. > Try putting an index on the FK column in the other table. Analyse the table. Test by starting a transaction then issuing: explain analyze delete from test where cola = 'abc'. Should be faster. Charles Duffy