pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Hodgson <ahodgson@simkin.ca>
To: pgsql-performance@postgresql.org
Subject: Re: is it possible to make this faster?
Date: Thu, 25 May 2006 13:36:30 -0700
Message-ID: <200605251336.30985@hal.medialogik.com> (raw)
In-Reply-To: <b42b73150605251331l85a1403pbf4c73656b6194bc@mail.gmail.com>
References: <b42b73150605251307id0e7998td4a3693f0d456f88@mail.gmail.com>
	<20060525202314.GA20747@wolff.to>
	<b42b73150605251331l85a1403pbf4c73656b6194bc@mail.gmail.com>

On May 25, 2006 01:31 pm, "Merlin Moncure" <mmoncure@gmail.com> wrote:
> > SELECT DISTINCT ON (a, b) a, b, c FROM t ORDER BY a DESC, b DESC, c
> > DESC;
>
> that is actually slower than group by in my case...am i missing
> something? (both essentially resolved to seq_scan)

Try it with an index on a,b,c.

-- 
Alan



view thread (25+ messages)  latest in thread

Message-ID: <200605251336.30985@hal.medialogik.com>
Permalink:  ../200605251336.30985@hal.medialogik.com/
Also on:    postgresql.org/message-id/200605251336.30985@hal.medialogik.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: ahodgson@simkin.ca
  Subject: Re: is it possible to make this faster?
  In-Reply-To: <200605251336.30985@hal.medialogik.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