Re: [BUGS] BUG #14635: Query is executed slower on hot standby slavedatabase then on master database

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема Re: [BUGS] BUG #14635: Query is executed slower on hot standby slavedatabase then on master database
Дата
Msg-id CAJrrPGcjNZO5UkexVfjF_CCBVrPtoY-iVvEYhP1n97z0ARWLoQ@mail.gmail.com
обсуждение исходный текст
Ответ на [BUGS] BUG #14635: Query is executed slower on hot standby slave databasethen on master database  (vgomenyuk@callfire.com)
Ответы Re: [BUGS] BUG #14635: Query is executed slower on hot standby slavedatabase then on master database  (Vitaliy Gomenyuk <vgomenyuk@callfire.com>)
Список pgsql-bugs


On Fri, Apr 28, 2017 at 11:38 PM, <vgomenyuk@callfire.com> wrote:
The following bug has been logged on the website:

Bug reference:      14635
Logged by:          Vitaliy Gomenyuk
Email address:      vgomenyuk@callfire.com
PostgreSQL version: 9.2.14
Operating system:   CentOS 6
Description:

Hello,

We have two equal servers (CPU, RAM, HDD).
We are using Postgresql 9.2.14 currently.
Have setup master-slave streaming replication.

Running next query at master and slave databases:
explain analyze SELECT "om".* FROM "Table" AS "om" WHERE (om."UserID" =
11111) AND (NOT om."Deleted") AND (om."Status" = 0) ORDER BY "StampToSend"
asc LIMIT 11;
An execution plans are the same on master and slave databases.

An execution time on master database: 138.116 ms
An execution time on hot standby slave database with working replication:
1623.496 ms
An execution time on slave database with turned off replication (after
creating trigger file): 132.354 ms (equal to an execution time on master
database).

Why there is so huge difference in execution time between Postgresql with
and without working streaming replication?
How to improve the situation: to make an execution time on Hot standby slave
dtabase with working replication equeal to master database?

Is the issue happening always or only sometimes? 
can you please check explain plan output on both the machines with verbose
and buffers options.

explain (analyze, verbose, buffers) /*query*/

The explain output may help in identifying the plan of the query where it is taking
more time compared to master.

Regards,
Hari Babu
Fujitsu Australia

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression