Denormalized field

From: Robert James <srobertjames(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Denormalized field
Date: 2013-08-18 03:56:46
Message-ID: CAGYyBghm+4yOWMeMLkWeQvD7NLMVsFFKW2YKcqmJM=JRMYCkuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a slow_function. My table has field f, and since slow_function
is slow, I need to denormalize and store slow_function(f) as a field.

What's the best way to do this automatically? Can this be done with
triggers? (On UPDATE or INSERT, SET slow_function_f =
slow_function(new_f) ) How?

Will creating an index on slow_function(f) do this?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-08-18 04:11:14 Re: Postgres cron job
Previous Message Robert James 2013-08-18 03:55:14 Postgres cron job