pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: scott.marlowe <scott.marlowe@ihs.com>
Cc: Pailloncy Jean-Gérard <pailloncy@ifrance.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: slow plan for min/max
Date: 08 Sep 2003 18:07:48 -0400
Message-ID: <87wucj3pe3.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <Pine.LNX.4.33.0309080954020.11520-100000@css120.ihs.com>
References: <Pine.LNX.4.33.0309080954020.11520-100000@css120.ihs.com>


"scott.marlowe" <scott.marlowe@ihs.com> writes:

> Basically, Postgresql uses an MVCC locking system that makes massively 

As discussed, uh, a few days ago, this particular problem is not caused by
MVCC but by postgres having a general purpose aggregate system and not having
special code for handling min/max. Aggregates normally require access to every
record they're operating on, not just the first or last in some particular
order. You'll note the LIMIT 1/DISTINCT ON work-around works fine with MVCC...

-- 
greg




view thread (20+ messages)  latest in thread

Message-ID: <87wucj3pe3.fsf@stark.dyndns.tv>
Permalink:  ../87wucj3pe3.fsf@stark.dyndns.tv/
Also on:    postgresql.org/message-id/87wucj3pe3.fsf@stark.dyndns.tv

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, scott.marlowe@ihs.com, pailloncy@ifrance.com
  Subject: Re: slow plan for min/max
  In-Reply-To: <87wucj3pe3.fsf@stark.dyndns.tv>
  References: <Pine.LNX.4.33.0309080954020.11520-100000@css120.ihs.com> <87wucj3pe3.fsf@stark.dyndns.tv>

* 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