pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: is it possible to make this faster?
Date: Thu, 25 May 2006 23:08:50 +0200
Message-ID: <20060525210850.GA20274@uio.no> (raw)
In-Reply-To: <b42b73150605251354j283af4d3i3f24143d26230094@mail.gmail.com>
References: <b42b73150605251307id0e7998td4a3693f0d456f88@mail.gmail.com>
	<20060525203630.GA19881@uio.no>
	<b42b73150605251354j283af4d3i3f24143d26230094@mail.gmail.com>

On Thu, May 25, 2006 at 04:54:09PM -0400, Merlin Moncure wrote:
>>  select a,b,(select c from t t2 order by c desc where t1.a=t2.a and 
>>  t1.b=t2.b)
>>  from t t1 group by a,b;
> this came out to a tie with the group by approach, although it
> produced a different (but similar) plan.  we are still orders of
> magnitude behind mysql here.

Actually, it _should_ produce a syntax error -- it's missing a LIMIT 1 in the
subquery.

/* Steinar */
-- 
Homepage: http://www.sesse.net/



view thread (25+ messages)  latest in thread

Message-ID: <20060525210850.GA20274@uio.no>
Permalink:  ../20060525210850.GA20274@uio.no/
Also on:    postgresql.org/message-id/20060525210850.GA20274@uio.no

 · 

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: sgunderson@bigfoot.com
  Subject: Re: is it possible to make this faster?
  In-Reply-To: <20060525210850.GA20274@uio.no>

* 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