From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-bugs(at)postgreSQL(dot)org> |
Subject: | Re: Hmm, nodeUnique doesn't really support backwards scan too well |
Date: | 2008-08-06 14:21:26 |
Message-ID: | 87prom2pi1.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> We could probably fix this by complicating the logic in ExecUnique,
> but I wonder whether it wouldn't be better to just stop treating
> Unique nodes as backwards-scannable. The only reason for that
> node type to exist (as opposed to using Group nodes) is that it's
> simple and low-overhead. So complicating it to support a corner case
> that no one has noticed in many years might be counterproductive.
> Thoughts?
Hm, that has the nasty side effect that someone who uses SCROLL but doesn't
fetch backwards much or at all suddenly gets a much more expensive plan than
if they didn't.
On the other hand someone who does actually use the scrollability of the
cursor to fetch forward and backwards a lot, repeatedly fetching the same
records, would actually get significantly better performance out of a
materialized result than having to skip over the duplicates repeatedly.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!
From | Date | Subject | |
---|---|---|---|
Next Message | Lampa | 2008-08-06 14:33:55 | BUG #4341: planner doesn't using index for = operation |
Previous Message | Markus Wanner | 2008-08-06 12:13:30 | Re: BUG #4339: The postgreSQL service stops abnormally |