Re: Order by (for 15 rows) adds 30 seconds to query time - Mailing list pgsql-performance

From Matthew Wakeling
Subject Re: Order by (for 15 rows) adds 30 seconds to query time
Date
Msg-id alpine.DEB.2.00.0912021104380.25000@aragorn.flymine.org
Whole thread Raw
In response to Re: Order by (for 15 rows) adds 30 seconds to query time  (Jean-Michel Pouré <jmpoure@free.fr>)
Responses Re: Order by (for 15 rows) adds 30 seconds to query time  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-performance
On Tue, 1 Dec 2009, Jean-Michel Pouré wrote:
> PostgreSQL query analyzer needs to run a couple of times before it can
> rewrite and optimize the query. Make sure demand_id, id and join IDs
> carry indexes.

Huh? At what point does the planner carry over previous plans and use them
to further optimise the query?

But perhaps the biggest factor here is calling a five table join a "pretty
simple query".

Matthew

--
 Prolog doesn't have enough parentheses. -- Computer Science Lecturer

pgsql-performance by date:

Previous
From: Richard Neill
Date:
Subject: Re: Order by (for 15 rows) adds 30 seconds to query time
Next
From: Laurent Laborde
Date:
Subject: Re: Cost of sort/order by not estimated by the query planner