X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3AC7B11F60A2 for ; Wed, 26 Apr 2006 11:27:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 22246-07 for ; Wed, 26 Apr 2006 11:27:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from pproxy.gmail.com (pproxy.gmail.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 6F6AD11F620C for ; Wed, 26 Apr 2006 11:27:14 -0300 (ADT) Received: by pproxy.gmail.com with SMTP id x66so1681137pye for ; Wed, 26 Apr 2006 07:27:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=US3JRl+ScfizTvbkI/kVQfM84P9OzVoAxo8YvdVeI3w8x1AgoudF5DieU24Rtrp9MNuPHXEdAeP905qJNjC5LZZK2VgP8+d7k5p+rxLKew+bu9/0xVPUGw7wFtr3OmQQmphWErXDvxQZOAB6eo5kI+tyTFTNdKa5btcgCzPPQqA= Received: by 10.35.54.20 with SMTP id g20mr537785pyk; Wed, 26 Apr 2006 07:27:13 -0700 (PDT) Received: by 10.35.82.19 with HTTP; Wed, 26 Apr 2006 07:27:13 -0700 (PDT) Message-ID: <8d04ce990604260727r65d009d6pef436465701c4203@mail.gmail.com> Date: Wed, 26 Apr 2006 07:27:13 -0700 From: "Junaili Lie" To: "Tom Lane" Subject: Re: slow deletes on pgsql 7.4 Cc: pgsql-performance@postgresql.org In-Reply-To: <10985.1146013474@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3653_14548820.1146061633558" References: <8d04ce990604251441ya85c42evb47946272536cabe@mail.gmail.com> <9147.1146006558@sss.pgh.pa.us> <8d04ce990604251714g1f5d99bbn172ec554a49c8374@mail.gmail.com> <10985.1146013474@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/601 X-Sequence-Number: 18685 ------=_Part_3653_14548820.1146061633558 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline It was on my first email. Here it is again: MONSOON=3D# explain delete from scenario where id=3D'1099'; QUERY PLAN ---------------------------------------------------------------------------= --- Index Scan using scenario_pkey on scenario (cost=3D0.00..3.14 rows=3D1 width=3D6) Index Cond: (id =3D 1099::bigint) (2 rows) MONSOON=3D# explain delete from scenario where id=3D'1023'; QUERY PLAN ---------------------------------------------------------------------------= --- Index Scan using scenario_pkey on scenario (cost=3D0.00..3.14 rows=3D1 width=3D6) Index Cond: (id =3D 1023::bigint) (2 rows) Thanks, J On 4/25/06, Tom Lane wrote: > > "Junaili Lie" writes: > > ie. delete from scenario where id=3D3D'1023' is very fast, but delete f= rom > > scenario where id=3D3D'1099' is running forever. > > What does EXPLAIN show for each of those cases? > > regards, tom lane > ------=_Part_3653_14548820.1146061633558 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
It was on my first email.
Here it is again:
MONSOON=3D# explain delete from scenario where id=3D'1099';
 &= nbsp;           &nbs= p;            &= nbsp;       QUERY PLAN
-------------------= -----------------------------------------------------------
 Index = Scan using scenario_pkey on scenario  (cost=3D 0.00..3.14 rows=3D1 width=3D6)
   Index Cond: (id =3D 1099::bi= gint)
(2 rows)

MONSOON=3D# explain delete from scenario where id= =3D'1023';
          &= nbsp;           &nbs= p;           QUERY PLAN-------------------------------------------------------------------------= -----
 Index Scan using scenario_pkey on scenario  (cost=3D0.00..3.= 14 rows=3D1 width=3D6)
   Index Cond: (id =3D 1023::bigint)(2 rows)
 
Thanks,
J

 
On 4/25/06, = Tom Lane <tgl@sss.pgh.pa.us= > wrote:
"Junaili Lie" <junaili@gmail.com> writes:
> = ie. delete from scenario where id=3D3D'1023' is very fast, but delete from
> scenario where id=3D3D'1099' is running forever.

What does = EXPLAIN show for each of those cases?

     =             &nb= sp;     regards, tom lane

------=_Part_3653_14548820.1146061633558--