Re: slow plan for min/max - Mailing list pgsql-performance

From Greg Stark
Subject Re: slow plan for min/max
Date
Msg-id 87wucj3pe3.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: slow plan for min/max  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: Christopher Browne
Date:
Subject: Re: slow plan for min/max
Next
From: Josh Berkus
Date:
Subject: Re: slow plan for min/max