From: Nico Williams <nico@cryptonector.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: generated columns
Date: Mon, 2 Oct 2017 10:23:41 -0500
Message-ID: <20171002152338.GH1251@localhost> (raw)
In-Reply-To: <b151f851-4019-bdb1-699e-ebab07d2f40a@2ndquadrant.com>
References: <b151f851-4019-bdb1-699e-ebab07d2f40a@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Thu, Aug 31, 2017 at 12:16:43AM -0400, Peter Eisentraut wrote:
> In previous discussions, it has often been a source of confusion whether
> these generated columns are supposed to be computed on insert/update and
> stored, or computed when read. The SQL standard is not explicit, but
> appears to lean toward stored. DB2 stores. Oracle computes on read.
Question: How would one know the difference between storing computed
columns vs. computing them on read?
Answer?: Performance. If the computation is slow, then you'll really
notice on read.
Nico
--
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nico@cryptonector.com, peter.eisentraut@2ndquadrant.com
Subject: Re: generated columns
In-Reply-To: <20171002152338.GH1251@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox