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 D84F89F9EEB for ; Tue, 23 May 2006 04:11:11 -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 17638-02 for ; Tue, 23 May 2006 04:11:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id AB70D9F9CAA for ; Tue, 23 May 2006 04:11:05 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 1603731932; Tue, 23 May 2006 09:11:04 +0200 (MET DST) From: Antonio Batovanja X-Newsgroups: comp.databases.postgresql,pgsql.performance Subject: Re: Query performance Followup-To: comp.databases.postgresql Date: Tue, 23 May 2006 09:10:29 +0200 Organization: Humanomed Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@uta.at User-Agent: KNode/0.9.2 To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/538 X-Sequence-Number: 19325 Steinar H. Gunderson wrote: > antonio.batovanja@humanomed.co.at wrote: >> The above query takes 5 seconds to execute! >> >> [...] >> >> Total runtime: 96109.571 ms > > It sure doesn't look like it... > >> Total runtime: 461.907 ms >> >> [...] >> >> Suddenly the query takes only 0.29 seconds! > > How are you timing this, really? > > /* Steinar */ I'm executing the queries from phpPgAdmin. The above are for explain analyse. I was referring to the pure query execution time. Does anyone have an idea why the OR-query takes so long? Any server-side tuning possibilities? I wouldn't like to change the code of ldap's back-sql... Toni