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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ