Re: how to avoid repeating expensive computation in select - Mailing list pgsql-general

From Tom Lane
Subject Re: how to avoid repeating expensive computation in select
Date
Msg-id 4046.1296773036@sss.pgh.pa.us
Whole thread Raw
In response to Re: how to avoid repeating expensive computation in select  (Nicklas Avén <nicklas.aven@jordogskog.no>)
List pgsql-general
Nicklas =?ISO-8859-1?Q?Av=E9n?= <nicklas.aven@jordogskog.no> writes:
> I thought the "offset 0" trick was just a dirty hack, but coming from
> you, Tom, I assume it is a robust way of doing it.

Well, I can't deny it's a dirty hack ... but it's not something we'll
break until we have a better solution.

> I also tried some of the queries we tried then, almost 2 years ago, and
> I think it seems like PostgreSQL handles this much better in 9.0. Is
> that possible?

That observation is too vague to comment on.  There are surely things
that are better in 9.0, but we haven't done anything lately that would
be likely to reduce the number of calls to a user-defined function per
se.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to avoid repeating expensive computation in select
Next
From: Mage
Date:
Subject: Re: isn't "insert into where not exists" atomic?