Re: Speeding up Aggregates - Mailing list pgsql-performance

From Rod Taylor
Subject Re: Speeding up Aggregates
Date
Msg-id 1065219071.91586.11.camel@jester
Whole thread Raw
In response to Re: Speeding up Aggregates  (Dror Matalon <dror@zapatec.com>)
List pgsql-performance
> > I hope it isn't the first or second one ;)
>
> CREATE or REPLACE FUNCTION item_max_date (int4, varchar) RETURNS
> timestamptz AS '
> select max(dtstamp) from items where channel = $1 and link = $2;
> ' LANGUAGE 'sql';


How about the below?

CREATE or REPLACE FUNCTION item_max_date (int4, varchar) RETURNS
timestamptz AS '
select max(dtstamp) from items where channel = $1 and link = $2;
' LANGUAGE 'sql' STABLE;

Attachment

pgsql-performance by date:

Previous
From: "Matt Clark"
Date:
Subject: Re: reindex/vacuum locking/performance?
Next
From: "Matt Clark"
Date:
Subject: Re: reindex/vacuum locking/performance?