Re: how to avoid repeating expensive computation in select

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nicklas Avén <nicklas(dot)aven(at)jordogskog(dot)no>
Cc: Bob Price <rjp_email(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: how to avoid repeating expensive computation in select
Date: 2011-02-03 22:43:56
Message-ID: 4046.1296773036@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nicklas =?ISO-8859-1?Q?Av=E9n?= <nicklas(dot)aven(at)jordogskog(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mage 2011-02-03 23:50:50 Re: isn't "insert into where not exists" atomic?
Previous Message Tom Lane 2011-02-03 22:33:30 Re: how to avoid repeating expensive computation in select