pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@2ndquadrant.com>
To: jesper@krogh.cc, "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org>
Subject: Re: Slow query-plan generation (fast query) PG 9.2
Date: Tue, 03 Sep 2013 15:47:08 +0800
Message-ID: <522593FC.3010302@2ndquadrant.com> (raw)
In-Reply-To: <e9ed24069c06d8b504fbef3e28df52d7.squirrel@shrek.krogh.cc>
References: <e9ed24069c06d8b504fbef3e28df52d7.squirrel@shrek.krogh.cc>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 09/03/2013 03:46 PM, jesper@krogh.cc wrote:
> Hi.
> 
> I have a strange situation where generating the query plan takes 6s+ and
> executing it takes very little time.

How do you determine that it's planning time at fault here?

Please take separate timing for:

PREPARE testq AS select table.id  from db.table left
join db.tablepro on db.id = tablepro.table_id where table.fts @@
to_tsquery('english','q12345') ;

and then:

EXPLAIN ANALYZE EXECUTE testq;

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (4+ messages)  latest in thread

Message-ID: <522593FC.3010302@2ndquadrant.com>
Permalink:  ../522593FC.3010302@2ndquadrant.com/
Also on:    postgresql.org/message-id/522593FC.3010302@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: craig@2ndquadrant.com
  Subject: Re: Slow query-plan generation (fast query) PG 9.2
  In-Reply-To: <522593FC.3010302@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox