Re: Performance issue after migration from 9.4 to 15

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Performance issue after migration from 9.4 to 15
Дата
Msg-id CAApHDvr6PGuXbUgu=o=t8vfxr5Gcx=ZSse2vWK9ycg453YwC2A@mail.gmail.com
обсуждение исходный текст
Ответ на Performance issue after migration from 9.4 to 15  (Christian Schröder <Christian.Schroeder@solvians.com>)
Ответы Re: Performance issue after migration from 9.4 to 15  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Tue, 11 Apr 2023 at 23:03, Christian Schröder
<Christian.Schroeder@solvians.com> wrote:
> We have recently migrated from our old PostgreSQL 9.4 server to a PostgreSQL 15 server. Even though the new machine
hasmore resources, we see a considerable decrease in the performance of some of our heavier queries, and I have no idea
whereI should start tuning. ? 

Using pg_upgrade? Did you run ANALYZE? If not then you may be
suffering from lack of statistics leading to bad plans.

> Old: https://explain.dalibo.com/plan/b7d7gab73f6c7274#plan/node/21
> New: https://explain.dalibo.com/plan/84h16cg1f19266be#plan/node/34

I'm not well versed in looking at JSON output plans. You might get a
better overall response posting to https://explain.depesz.com/.
Personally, I always look for raw output, and at least with depesz,
that's text-based.

> Particularly interesting are the sequential scans. In the old plan, we have node #21, which took 32 seconds. Almost
allof the time goes into actual I/O. In the new plan, the corresponding node is #34. It took 55 seconds, but less than
1second was actual I/O (because most of the data was already in memory). Why did this step still take about twice the
time?

Perhaps your 15 server is under more load than 9.4 due to all
concurrent plans being slower from bad statistics? Load averages might
be a good indicator. (I assume the server is busy due to the "Workers
Launched": 0)

> Am I misreading the plans? If not, I have no idea why the sequential scans take so much longer in the new database,
eventhough the I/O is even faster than before. 

Looks that way to me too.

> Can anybody give me a hint into which direction I should investigate further?

Probably just run ANALYZE on the database in question.

David



В списке pgsql-general по дате отправления:

Предыдущее
От: Christian Schröder
Дата:
Сообщение: RE: Performance issue after migration from 9.4 to 15
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance issue after migration from 9.4 to 15