Enquiry about Percona TDE performance issues

Started by Ashish Mukherjee7 months ago3 messagesgeneral
Jump to latest
#1Ashish Mukherjee
ashish.mukherjee@gmail.com

Hello,

I recently upgraded from pgsql 12 to pgsql 17. It's a Percona TDE enabled
database. However, after the upgrade the query planning time has shot up by
10x when I check explain analyze output.

The difference in planning time is visible here. The first case is pgsql 17
with TDE. The second case pgsql 12 with TDE.

s14=> explain analyze select invoicenum from ltlinvoice where
pseq=1400000224216382;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Index Scan using ltlinvoice_pseq on ltlinvoice (cost=0.43..10.10 rows=9
width=12) (actual time=0.040..0.040 rows=0 loops=1)
Index Cond: (pseq = '1400000224216382'::bigint)
Planning Time: 158.199 ms
Execution Time: 0.051 ms

s14=> explain analyze select invoicenum from ltlinvoice where
pseq=1400000224216382;
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Index Scan using ltlinvoice_pseq on ltlinvoice (cost=0.43..10.10 rows=9
width=12) (actual time=0.023..0.023 rows=0 loops=1)
Index Cond: (pseq = '1400000224216382'::bigint)
Planning Time: 0.195 ms
Execution Time: 0.046 ms

Any pointers about this would be helpful.

Regards,
Ashish

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Ashish Mukherjee (#1)
Re: Enquiry about Percona TDE performance issues

On 9/25/25 04:36, Ashish Mukherjee wrote:

Hello,

I recently upgraded from pgsql 12 to pgsql 17. It's a Percona TDE
enabled database. However, after the upgrade the query planning time has
shot up by 10x when I check explain analyze output.

Did the Postgres 12 instance have the Percona TDE extension installed also?

How did you do the upgrade?

Did you run ANALYZE on the new Postgres 17 instance?

Regards,
Ashish

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Ashish Mukherjee
ashish.mukherjee@gmail.com
In reply to: Adrian Klaver (#2)
Re: Enquiry about Percona TDE performance issues

Yes, PgSQL 12 also had TDE

The upgrade was done by taking a complete dump of the schema + data from
v12 instance and then restoring to v17. Used pg_dump and pg_restore
respectively.

Yes, Vacuum analyze was also run on the new instance.

On Fri, Sep 26, 2025 at 12:40 AM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 9/25/25 04:36, Ashish Mukherjee wrote:

Hello,

I recently upgraded from pgsql 12 to pgsql 17. It's a Percona TDE
enabled database. However, after the upgrade the query planning time has
shot up by 10x when I check explain analyze output.

Did the Postgres 12 instance have the Percona TDE extension installed also?

How did you do the upgrade?

Did you run ANALYZE on the new Postgres 17 instance?

Regards,
Ashish

--
Adrian Klaver
adrian.klaver@aklaver.com