X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id E00CE30F0EA for ; Tue, 17 Jun 2003 11:28:22 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 05871-05 for ; Tue, 17 Jun 2003 08:28:12 -0300 (ADT) Received: from manica.mvweb.de (unknown [212.184.88.123]) by svr1.postgresql.org (Postfix) with SMTP id 873B730EFDD for ; Tue, 17 Jun 2003 08:28:11 -0300 (ADT) Received: (qmail 8451 invoked by uid 104); 17 Jun 2003 11:48:15 -0000 Received: from jantos-work@mvweb.de by manica.mvweb.de by uid 101 with qmail-scanner-1.16 (sweep: 2.14/3.68. clamscan: 0.54. spamassassin: 2.52. Clear:. Processed in 0.364403 secs); 17 Jun 2003 11:48:15 -0000 X-Qmail-Scanner-Mail-From: jantos-work@mvweb.de via manica.mvweb.de X-Qmail-Scanner: 1.16 (Clear:. Processed in 0.364403 secs) Received: from sn-gw.mvweb.de (HELO mvweb.de) (212.184.88.121) by manica.mvweb.de with SMTP; 17 Jun 2003 11:48:14 -0000 Message-ID: <3EEEFB50.1070908@mvweb.de> Date: Tue, 17 Jun 2003 13:28:16 +0200 From: Tony Simbine User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: de, pt, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Cc: Josh Berkus Subject: Re: help References: <3EE88B1F.2050003@mvweb.de> <200306121010.45479.josh@agliodbs.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200306/177 X-Sequence-Number: 13935 Josh, thanks for your help. Josh Berkus wrote: > Tony, > > >>I've a query which needs too many time ca. 12-15 sec. >>how can i get a better perfomance? > > > First of all, please take this to the PGSQL-PERFORMANCE list. > > Second, see this web page: > http://techdocs.postgresql.org/guides/SlowQueryPostingGuidelines i read some tips on the above pages and my database and all my queries run very well. i've optimized the queriey from where ... IN (select ..) to EXISTS and I've done vacumdb full. my requests last between 0.009 to 0.2 sec compared with 12-15 sec. i'm very happy. thanks very much. tony > > >>explain select o.id from ioobeject o,dist_vertron v where >>macro_lid=1123 and (o.id=v.id) and (o.deleted<>'1') and >>(o.status='activo') order by o.ort; > > > Third, from your explain, ioobject and dist_vertron are obviously somewhat > complex views. We need those view definitions, possibly plus schema for the > underlying tables (including indexes), or we can't help you. >