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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠