"Gopisetty, Ramesh" writes:
> Policy
> create policy policy_sel on test FOR SELECT to ram1 USING ( testkey in
> (f_sel_policy_test(testkey)) );
> Going to a Sequential scan instead of index scan. Hence, performance issue.
> If i replace the policy with stright forward without function then
De: "Gopisetty, Ramesh"
Para: "pgsql-performance"
Enviadas: Quarta-feira, 16 de setembro de 2020 0:39:08
Assunto: Performance issue when we use policies for Row Level Security along
with functions
BQ_BEGIN
Hi,
I'm seeing a strange behavior when we implement policies (for RLS - Row
Hi,
I'm seeing a strange behavior when we implement policies (for RLS - Row level
security) using functions.
table test consists of columns testkey,oid,category,type,description...
Policy
create policy policy_sel on test FOR SELECT to ram1 USING ( testkey in
(f_sel_policy_test(testkey))
> You're asking whether to keep one index or the other?
My ask is which index can be used for the mentioned query in production for
better IO
> It depends on *all* the queries you'll run, not just this one.
I'm more concerned about this specific query, this has been using in one block
stored pro