Postgres Query running slow, using pgcrypto externsion in psotgres sql

0

using pgcrypto externsion in psotgres sql, following is the output for below queryies

Query 1:

explain analyze (select * from table_name);  

above query taking time around 900 ms

but when i am using query with 'pgp_sym_decrypt' it taking longer time around 54 sec, that is too high

Encrypted column is indexed


explain analyze (select
	pgp_sym_decrypt("table_name"."sender_contact_person_name",
	'encryption_key')::text,
	pgp_sym_decrypt("table_name"."sender_contact_person_email", 'encryption_key')::text,
	pgp_sym_decrypt("table_name"."sender_contact_person_contact_no",
	'encryption_key')::text,
	pgp_sym_decrypt("table_name"."recipient_contact_person_name",
	'encryption_key')::text,
	pgp_sym_decrypt("table_name"."recipient_contact_person_email",
	'encryption_key')::text,
	pgp_sym_decrypt("table_name"."recipient_contact_person_contact_no",
	'encryption_key')::text,
from
	"table_name"
where
	"table_name"."is_active"
order by
	"table_name"."pickup_date_time"
limit 10)
shiv
已提問 8 個月前檢視次數 95 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南