Re: slow plan for min/max

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: Pailloncy Jean-Gérard <pailloncy(at)ifrance(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: slow plan for min/max
Date: 2003-09-08 22:07:48
Message-ID: 87wucj3pe3.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


"scott.marlowe" <scott(dot)marlowe(at)ihs(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-09-08 22:40:48 Re: slow plan for min/max
Previous Message Alberto Caso 2003-09-08 22:04:40 Re: [PERFORM] Explain Doc