Re: Useless sort by

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gaetano Mendola <mendola(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Useless sort by
Date: 2010-09-14 15:09:18
Message-ID: AANLkTimK90T2Rb1aaoX=wLXEk5YmmmXjGtNojCn+yoMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> You could check for volatile functions. I think this could be done safely.

I don't think that's enough. A UDA like last() could have an immutable
sfunc, but still be sensitive to the sort order. I think you'd need
something like a special order-sensitive aggregate definition flag.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message mark 2010-09-14 16:10:33 Held idle connections vs use of a Pooler
Previous Message Merlin Moncure 2010-09-14 12:01:05 Re: Major performance problem after upgrade from 8.3 to 8.4