← Back to Knowledge Base

KB #240032: Implications of Column Encryption on Queries When Using Views

⏱️ 2 min read
Type: Information
Summary:
For views where a column that is encrypted on disk is presented as decrypted in a view, there are issues that needs to be understood regarding performance.
Additional Information:
This topic discusses the impact of encryption on “transparent views”, i.e., views that present an encrypted column as decrypted. Consider the following query on the transparent view “Employees”, where the SSNO column is transparently encrypted, i.e., the view name replaces the underlying table name, the SSNO column is encrypted on disk, but presented decrypted in the view:

select * from Employees where SSNO = ‘123456789’

With a transparent view, this effectively becomes the following query:

select * from Employees where fn_n_decrypt_char(SSNO) = ‘123456789’

Even though it is a unique value, SQL must still decrypt every row to make the comparison. Again, with a small table of a few thousand records, this may not make a large difference. For a large table, you will get far better performance using non-transparent views using the query above, where you are looking up the unique encrypted value, for example:

select * from employees where ssno = fn_n_encrypt_char(@cSSno)

Be aware that queries may take longer when data is encrypted.

Related Topics:
240031 Considerations When Implementing Column Encryption and the Impact on Performance
240005 Cannot Perform Case-Insensitive Compare on Encrypted Strings Using APIs

 

Was this article helpful?

Related Articles

KB #240128: Sending files privately to NetLib Security Support

Type: Tip Summary: Use the utility and procedure described below to email sensitive files to…

KB #240081: SQL Trace Files are being Encrypted

  Type: Information Summary: If you check the “Encrypt New” check box when Securing an…

KB #240059: Error: “Invalid path or file name”

Type: Known Issues Summary: When installing API’s or running any Encryptionizer Utility, you receive an…

Still need help?

Our support team is here to assist you.

NetLib Security
AI Assistant · Online
Hi! I'm the NetLib Security assistant. I can answer questions about our encryption solutions, HIPAA compliance, Encryptionizer, and more. How can I help you today?