Re: immutable functions vs. join for lookups ?

От: Merlin Moncure
Тема: Re: immutable functions vs. join for lookups ?
Дата: ,
Msg-id: 6EE64EF3AB31D5448D0007DD34EEB3415C2596@Herge.rcsinc.local
(см: обсуждение, исходный текст)
Ответ на: immutable functions vs. join for lookups ?  (Enrico Weigelt)
Ответы: Re: immutable functions vs. join for lookups ?  (Dawid Kuroczko)
Re: immutable functions vs. join for lookups ?  (Tom Lane)
Список: pgsql-performance

Скрыть дерево обсуждения

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 по дате сообщения:

От: "Mohan, Ross"
Дата:
Сообщение: Re: How to improve db performance with $7K?
От: Alex Turner
Дата:
Сообщение: Re: How to improve db performance with $7K?