Re: immutable functions vs. join for lookups ?

From: Merlin Moncure
Subject: Re: immutable functions vs. join for lookups ?
Date: ,
Msg-id: 6EE64EF3AB31D5448D0007DD34EEB3415C2596@Herge.rcsinc.local
(view: Whole thread, Raw)
In response to: immutable functions vs. join for lookups ?  (Enrico Weigelt)
Responses: Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko)
Re: immutable functions vs. join for lookups ?  (Tom Lane)
List: pgsql-performance

Tree view

immutable functions vs. join for lookups ?  (Enrico Weigelt, )
 Re: immutable functions vs. join for lookups ?  (Tom Lane, )
  Re: immutable functions vs. join for lookups ?  (Enrico Weigelt, )
   Re: immutable functions vs. join for lookups ?  (Jaime Casanova, )
    Re: immutable functions vs. join for lookups ?  (Enrico Weigelt, )
     Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko, )
 Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko, )
 Re: immutable functions vs. join for lookups ?  ("Merlin Moncure", )
  Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko, )
   Re: immutable functions vs. join for lookups ?  ("Jim C. Nasby", )
    Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko, )
     Re: immutable functions vs. join for lookups ?  (Christopher Kings-Lynne, )
     Re: immutable functions vs. join for lookups ?  (Christopher Kings-Lynne, )
  Re: immutable functions vs. join for lookups ?  (Tom Lane, )
   Re: immutable functions vs. join for lookups ?  (Greg Stark, )
    Re: immutable functions vs. join for lookups ?  (Tom Lane, )
     Re: immutable functions vs. join for lookups ?  (Enrico Weigelt, )
      Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko, )

> 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


pgsql-performance by date:

From: "Dave Held"
Date:
Subject: Re: Sort and index
From: Tom Lane
Date:
Subject: Re: immutable functions vs. join for lookups ?