pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: function not called if part of aggregate
Date: Sun, 11 Jun 2006 19:31:55 +0200
Message-ID: <20060611173155.GA9244@uio.no> (raw)
In-Reply-To: <448C505C.2080504@modgraph-usa.com>
References: <448C505C.2080504@modgraph-usa.com>

On Sun, Jun 11, 2006 at 10:18:20AM -0700, Craig A. James wrote:
> This works well, but it requires me to actually retrieve the function's 
> value 800 times.

Is this actually a problem?

> So I thought I'd be clever:
> 
>   select count(1) from (select foo_init(value) from foo_init_table order by 
>   value_id) as foo;

Why not just count(foo_init(value))?

/* Steinar */
-- 
Homepage: http://www.sesse.net/



view thread (7+ messages)  latest in thread

Message-ID: <20060611173155.GA9244@uio.no>
Permalink:  ../20060611173155.GA9244@uio.no/
Also on:    postgresql.org/message-id/20060611173155.GA9244@uio.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sgunderson@bigfoot.com
  Subject: Re: function not called if part of aggregate
  In-Reply-To: <20060611173155.GA9244@uio.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox