Re: Order by (for 15 rows) adds 30 seconds to query time

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: Jean-Michel Pouré <jmpoure(at)free(dot)fr>
Cc: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Order by (for 15 rows) adds 30 seconds to query time
Date: 2009-12-02 11:08:17
Message-ID: alpine.DEB.2.00.0912021104380.25000@aragorn.flymine.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurent Laborde 2009-12-02 11:13:35 Re: Cost of sort/order by not estimated by the query planner
Previous Message Richard Neill 2009-12-02 05:42:59 Re: Order by (for 15 rows) adds 30 seconds to query time