19.06.2013 Views

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

DB2 UDB for z/OS Version 8 Performance Topics - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DB2</strong> must call RACF <strong>for</strong> this dominance checking if the rows SECLABEL has not already<br />

been encountered and there<strong>for</strong>e cached.<br />

If RACF is called, studies have shown up to a 10% impact on CPU with SELECT statements<br />

using Row Level Security. If the SECLABEL is found in the cache, this impact reduces to 2%.<br />

For a FETCH rather than a SELECT, this can be as high as 5%. This is because the CPU time<br />

which can be attributed to the overhead or Row Level Security consumes a larger percentage<br />

of the total CPU time.<br />

INSERT<br />

If the user has write-down privilege or write-down control is not enabled, the user can set the<br />

SECLABEL <strong>for</strong> the row to a valid security label that is not disjoint in relation to the user's<br />

security. If the user does not specify a value <strong>for</strong> the SECLABEL, the SECLABEL of the row<br />

becomes the same as the SECLABEL of the user. Alternatively, If the user does not have<br />

write-down privilege and write-down control is enabled, the SECLABEL of the row becomes<br />

the same as the SECLABEL of the user.<br />

The cost of each INSERT statement can increase by up to 2%. This is also dependent on the<br />

complexity of the INSERT statement, the number of columns to be INSERTed and the<br />

number of indexes that must be updated. The extra overhead results in <strong>DB2</strong> extracting the<br />

user’s SECLABEL value and building the new row with this extra column.<br />

UPDATE<br />

If the SECLABEL of the user and the SECLABEL of the row are equivalent, the row is<br />

updated and the value of the SECLABEL is determined by whether the user has write-down<br />

privilege. If the user has write-down privilege or write-down control is not enabled, the user<br />

can set the SECLABEL of the row to a valid security label that is not disjoint in relation to the<br />

user's security. If the user does not have write-down privilege and write-down control is<br />

enabled, the SECLABEL of the row is set to the value of the SECLABEL of the user.<br />

Alternatively, if the SECLABEL of the user dominates the SECLABEL of the row, the result of<br />

the UPDATE statement is determined by whether the user has write-down privilege. If the<br />

user has write-down privilege or write-down control is not enabled, the row is updated and the<br />

user can set the SECLABEL of the row to a valid security label that is not disjoint in relation to<br />

the user's security. If the user does not have write-down privilege and write-down control is<br />

enabled, the row is not updated.<br />

Finally, if the SECLABEL of the row dominates the SECLABEL of the user, the row is not<br />

updated.<br />

As is the case with SELECT, RACF is not consulted unless the user’s SECLABEL is not<br />

already cached. There<strong>for</strong>e we see the same degree of overhead in using Row Level Security<br />

as in the case of SELECT. We see up to a 10% per<strong>for</strong>mance impact if the user’s SECLABEL<br />

is not cached and up to 2% if it is cached.<br />

DELETE<br />

If the SECLABEL of the user and the SECLABEL of the row are equivalent, the row is<br />

deleted.<br />

If the SECLABEL of the user dominates the SECLABEL of the row, the user’s write-down<br />

privilege determines the result of the DELETE statement: If the user has write-down privilege<br />

or write-down control is not enabled, the row is deleted. Alternatively, if the user does not have<br />

write-down privilege and write-down control is enabled, the row is not deleted.<br />

Finally, if the SECLABEL of the row dominates the SECLABEL of the user, the row is not<br />

deleted.<br />

196 <strong>DB2</strong> <strong>UDB</strong> <strong>for</strong> z/<strong>OS</strong> <strong>Version</strong> 8 Per<strong>for</strong>mance <strong>Topics</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!