From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | Kevin Grittner <kgrittn(at)mail(dot)com>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Review of Row Level Security |
Date: | 2012-12-23 19:16:38 |
Message-ID: | 300.1356290198@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> On 21 December 2012 16:51, Kevin Grittner <kgrittn(at)mail(dot)com> wrote:
>> If none, and this is strictly an optimization, what are the benchmarks
>> showing?
> AFAIK its well known that a check constraint is much faster than a
> trigger.
I don't believe that that's "well known" at all, at least not for
apples-to-apples comparison cases. A C-coded BEFORE trigger doesn't
have very much overhead; I suspect it's probably comparable to
expression evaluation setup overhead. I think if you want to argue
for this on performance grounds, you need to actually prove there's
a significant performance advantage, not just assume there will be.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-12-23 19:28:58 | Re: Review of Row Level Security |
Previous Message | Simon Riggs | 2012-12-23 18:49:40 | Re: Review of Row Level Security |