Re: immutable functions vs. join for lookups ?

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: immutable functions vs. join for lookups ?
Date: 2005-04-18 12:50:46
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3415C2596@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> d) self-join with a function ;)
> EXPLAIN ANALYZE SELECT * FROM (SELECT n, id2username(n) AS username
> FROM (SELECT DISTINCT n FROM aaa) AS values) AS v_lookup RIGHT JOIN
> aaa USING (n);

That's pretty clever.
It sure seems like the server was not caching the results of the
function...maybe the server thought it was to small a table to bother?

Merlin

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message brew 2005-04-18 12:53:10 Re: Debian stable, was Re: Storing Large Objects
Previous Message Gordon Haverland 2005-04-18 11:12:03 Debian stable, was Re: Storing Large Objects