Re: Multiple Order By Criteria

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, J(at)planeti(dot)biz
Subject: Re: Multiple Order By Criteria
Date: 2006-01-17 22:40:36
Message-ID: 20060117143952.D47156@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On Tue, 17 Jan 2006, Josh Berkus wrote:

> J,
>
> > I have an index built for each of these columns in my order by clause.
> > This query takes an unacceptable amount of time to execute. Here are the
> > results of the explain:
>
> You need a single index which has all five columns, in order.

I think he'll also need a reverse opclass for the first column in the
index or for the others since he's doing desc, asc, asc, asc, asc.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Frank Wiles 2006-01-17 22:51:15 Re: Suspending SELECTs
Previous Message J 2006-01-17 22:29:04 Re: Multiple Order By Criteria