Row level security performance joining large tables

Поиск
Список
Период
Сортировка
От David R. Pike
Тема Row level security performance joining large tables
Дата
Msg-id 103877619.228905.1477674957518.JavaMail.root@trustedconcepts.com
обсуждение исходный текст
Ответы Re: Row level security performance joining large tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Row level security performance joining large tables  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
I recently applied RLS to several large (several million rows) tables in my 9.5 database and noticed that queries
againsta single large RLS protected table perform well however queries that join several large RLS protected tables
performvery poorly.  The explain plan shows the optimizer is scanning the entire table to enforce the RLS policy before
executingthe primary key join that would reduce the query results to a single row from each table.  Clearly performance
wouldbe better if it performed the join before the policy check. 

From what I can understand the RLS implementation strives to execute policy checks before user provided predicate
checksso as to avoid leaking protected data.  Is there any way to make the join look "safe" to the optimizer to avoid
fulltable scans?  Isn't this a common scenario? 

Thanks,
Dave


В списке pgsql-general по дате отправления:

Предыдущее
От: "Venkatesh Gudi (vgudi)"
Дата:
Сообщение: postgres installer fails with comspec error even though it is correct
Следующее
От: Mick GRIFFIN
Дата:
Сообщение: Cannot access the return value of a PostgreSQL function using ADO