From: | Siraj G <tosiraj(dot)g(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Performance difference between Primary & Secondary in the query execution |
Date: | 2024-10-17 14:08:06 |
Message-ID: | CAC5iy60Fju3h0qrOS5M70G58fc_d69YTOD20vwr5bWnW1B5AQg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello Experts!
We have a PgSQL instance running with HA (secondary is being in sync with
streaming replication). Both the ends, we have same version, but not sure a
few SQLs behave badly in the secondary:
Primary:
PostgreSQL 12.20 (Ubuntu 12.20-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
OS: Ubuntu 20.04.6 LTS \n \l
Secondary:
ostgreSQL 12.20 (Ubuntu 12.20-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu,
compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
OS: Ubuntu 20.04.6 LTS \n \l
The application consumes more data from secondary, hence the server has
extra vCPUs.
Can you please advise what needs to be checked.
FYI, I am attaching the query with the different execution plans.
Regards
Siraj
Attachment | Content-Type | Size |
---|---|---|
bad-explain-secondary | application/octet-stream | 5.6 KB |
explain-primary | application/octet-stream | 5.0 KB |
query | application/octet-stream | 2.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Wienhold | 2024-10-17 15:12:30 | Re: Download of v16.1 for Windows 64B |
Previous Message | Carlos Oliva | 2024-10-17 14:06:20 | Download of v16.1 for Windows 64B |