X-Original-To: pgsql-performance@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 0F81B925AF6 for ; Wed, 28 May 2003 15:57:28 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 24866-04 for ; Wed, 28 May 2003 15:57:23 -0400 (EDT) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by developer.postgresql.org (Postfix) with ESMTP id 68FFC925AB7 for ; Wed, 28 May 2003 15:57:23 -0400 (EDT) Received: from attbi.com (dtenny.ne.client2.attbi.com[24.60.113.221]) by attbi.com (sccrmhc03) with SMTP id <2003052819572300300jc3sre>; Wed, 28 May 2003 19:57:23 +0000 Message-ID: <3ED514A2.8060107@attbi.com> Date: Wed, 28 May 2003 15:57:22 -0400 From: Dave Tenny User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mario Weilguni Cc: Andreas Pflug , pgsql-performance@postgresql.org Subject: Re: IN list processing performance (yet again) References: <3ED4B0E5.3050703@attbi.com> <3ED4B75A.2050106@web.de> <3ED4FB02.1010908@attbi.com> <200305282029.44152.mweilguni@sime.com> In-Reply-To: <200305282029.44152.mweilguni@sime.com> Content-Type: multipart/alternative; boundary="------------000003050904030903060308" X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/246 X-Sequence-Number: 2025 This is a multi-part message in MIME format. --------------000003050904030903060308 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mario Weilguni wrote: >>I'm reminded to relay to the PostgreSQL devos that I might be able to do >>more in the join or subquery department if >>PostgreSQL had better performing MAX functions and a FIRST function for >>selecting rows from groups. >>("Performing" being the operative word here, since the extensible >>architecture of PostgreSQL currently makes for poorly >>performing MAX capabilities and presumably similar user defined >>aggregate functions). >> >> > >MIN/MAX is almost in every case replaceable: >select bar > from foo > order by bar limit 1; > >instead of >select max(bar) from foo; > > Yup, been there, done that, but thanks, it's a good tidbit for the postgresql unaware. There are some places however where it doesn't work well in query logic, though I don't have an example off the top of my head since I've worked around it in all my queries. --------------000003050904030903060308 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Mario Weilguni wrote:
I'm reminded to relay to the PostgreSQL devos that I might be able to do
more in the  join or subquery department if
PostgreSQL had better performing MAX functions and a FIRST function for
selecting rows from groups.
("Performing" being the operative word here, since the extensible
architecture of PostgreSQL currently makes for poorly
performing MAX capabilities and presumably similar user defined
aggregate functions).
    

MIN/MAX is almost in every case replaceable:
select bar
   from foo
 order by bar limit 1;

instead of
select max(bar) from foo;
  
Yup, been there, done that, but thanks, it's a good tidbit for the postgresql unaware.

There are some places however where it doesn't work well in query logic, though I don't have an example off the top of my head
since I've worked around it in all my queries.


--------------000003050904030903060308--