Re: Storing computed values

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: Storing computed values
Дата
Msg-id 396486430804211048p38cb673dl17284ef8e11481ef@mail.gmail.com
обсуждение исходный текст
Ответ на Storing computed values  (Colin Wetherbee <cww@denterprises.org>)
Ответы Re: Storing computed values
Список pgsql-general
On Mon, Apr 21, 2008 at 10:34 AM, Colin Wetherbee <cww@denterprises.org> wrote:

> I would like to have a table that contains a connection for each distinct
> pair of points (point1 to point2 is the same as point2 to point1).  This
> table would then be automatically updated every time a modification is made
> to the reference table.  If my calculation is correct, the new table would
> contain 3,654,456 rows using the current data set.
>
> I realize I could use a TRIGGER to keep the connections table fresh, and
> perhaps that's also a solution.
>
> But, really, I'm just wondering if PostgreSQL has some automated, built-in
> facility for situations like this?

Would a functional index do this for you?  Perhaps, you wouldn't even
need a table is you store these computed values in an index instead.


--
Regards,
Richard Broersma Jr.

В списке pgsql-general по дате отправления:

Предыдущее
От: Colin Wetherbee
Дата:
Сообщение: Storing computed values
Следующее
От: Colin Wetherbee
Дата:
Сообщение: Re: Storing computed values