X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1AAA2DA8D2 for ; Wed, 26 Oct 2005 14:57:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11406-09 for ; Wed, 26 Oct 2005 17:57:48 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.197.194]) by svr1.postgresql.org (Postfix) with SMTP id 22DD2DA8E0 for ; Wed, 26 Oct 2005 14:57:47 -0300 (ADT) Received: (qmail 20056 invoked by uid 500); 26 Oct 2005 17:59:30 -0000 Date: Wed, 26 Oct 2005 12:59:30 -0500 From: Bruno Wolff III To: "Jim C. Nasby" Cc: Sidar L?pez Cruz , pgsql-admin@postgresql.org Subject: Re: zero performance on query Message-ID: <20051026175930.GC11447@wolff.to> Mail-Followup-To: Bruno Wolff III , "Jim C. Nasby" , Sidar L?pez Cruz , pgsql-admin@postgresql.org References: <20051026033658.GD16682@pervasive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051026033658.GD16682@pervasive.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 required=5 tests=[AWL=0.007] X-Spam-Level: X-Archive-Number: 200510/280 X-Sequence-Number: 19352 On Tue, Oct 25, 2005 at 22:36:58 -0500, "Jim C. Nasby" wrote: > We need the output of EXPLAIN ANALYZE, from both versions if possible. Isn't that going to be a problem in this case since it seems unlikely that EXPLAIN ANALYZE will finish in a reasonable amount of time? > > Also, pgsql-performance would be a better list for this... > > On Tue, Oct 25, 2005 at 05:31:22PM -0600, Sidar L?pez Cruz wrote: > > what happend with postgresql 8.1b4 performance on query? > > > > look at this: > > select count(*) from fotos where archivo not in (select archivo from > > archivos) > > Aggregate (cost=4899037992.36..4899037992.37 rows=1 width=0) > > -> Seq Scan on fotos (cost=22598.78..4899037338.07 rows=261716 width=0) > > Filter: (NOT (subplan)) > > SubPlan > > -> Materialize (cost=22598.78..39304.22 rows=805344 width=58) > > -> Seq Scan on archivos (cost=0.00..13141.44 rows=805344 > > width=58) > > > > I WILL DIE WAITING FOR QUERY RESPONSE !!! > > -- > > CREATE TABLE archivos ( archivo varchar(20)) WITHOUT OIDS; > > CREATE INDEX archivos_archivo_idx ON archivos USING btree(archivo); > > ~800000 rows > > -- > > CREATE TABLE fotos > > ( > > cedula varchar(20), > > nombre varchar(100), > > apellido1 varchar(100), > > apellido2 varchar(100), > > archivo varchar(20) > > ) WITHOUT OIDS; > > CREATE INDEX fotos_archivo_idx ON fotos USING btree (archivo); > > CREATE INDEX fotos_cedula_idx ON fotos USING btree (cedula); > > ~500000 rows > > > > _________________________________________________________________ > > Charla con tus amigos en l?nea mediante MSN Messenger: > > http://messenger.latam.msn.com/ > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: don't forget to increase your free space map settings > > > > -- > Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com > Pervasive Software http://pervasive.com work: 512-231-6117 > vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq