Search Postgresql Archives

Re: Index is not used for "IN (non-correlated subquery)"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merlin Moncure <mmoncure@xxxxxxxxx> writes:
> On Wed, Nov 30, 2016 at 11:05 AM, George <pinkisntwell@xxxxxxxxx> wrote:
>> So there is definitely something wrong here. This situation makes many
>> row-level security use cases cumbersome since you need to have
>> almost the same WHERE clause both in the row-level security policy and
>> in every SELECT query in order for the index to be used.

> can you give EXPLAIN ANALYZE for the 'good' query and the 'bad' query?

Planning for queries affected by RLS is definitely an area where we need
to improve (I'm working on a patch for that).  Whether the OP's particular
query is being hit by that is impossible to tell, though, since there
isn't any actual RLS usage in the doubtless-oversimplified example.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux