content_image/979224.jpg
## 8.2.4 Row permission indexability for correlated subqueries 

Row permissions improve data security at a lower level of granularity and become an attractive solution for integrating that security into the database system rather than requiring application control or implemented by using views. Efficiency of security validation is paramount; therefore, this enhancement in Db2 12 to resolve indexability of correlated subquery predicates within a row permission. 

Before Db2 12, correlated subquery predicates within a row permission are stage 2 predicates during insert and update operations. A correlated subquery example of a row permission is highlighted in Figure 8-13. 

<img src='content_image/979224.jpg'>

Db2 can now use an index for the EXISTS part of the row permission during insert and update. 

## Performance results 

Performance results for improved row permission indexability included the IBM Retail Data Warehouse workload, which featured a modified TPCH queries that used row permissions. Up to a 99% reduction in CPU and elapsed time was observed. 

