pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anthony Sotolongo <asotolongo@gmail.com>
To: Keith <keith@keithf4.com>
To: Sumeet Shukla <sumeet.k.shukla@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] 2 server with same configuration but huge difference in performance
Date: Tue, 1 Aug 2017 10:21:02 -0400
Message-ID: <084c7a84-5035-10b7-80a0-f5c19968c485@gmail.com> (raw)
In-Reply-To: <CAHw75vveLeAga5_0t7ze=jMcJrX3796f9d9iLbWF2_yLyTxFBg@mail.gmail.com>
References: <CABUL134EOvvkqfoMYWQr05D+VjEVu0cuSHT8rtf-7b6QvGedXQ@mail.gmail.com>
	<CAHw75vveLeAga5_0t7ze=jMcJrX3796f9d9iLbWF2_yLyTxFBg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hi Sumeet Shukla

While script is running check the pg_stat_activity, this view can be util


Regards

Anthony


On 01/08/17 10:16, Keith wrote:
>
> On Tue, Aug 1, 2017 at 9:41 AM, Sumeet Shukla 
> <sumeet.k.shukla@gmail.com <mailto:sumeet.k.shukla@gmail.com>> wrote:
>
>     Hi,
>
>     I have 2 PG servers with same h/w and configuration and they are
>     not in replication.
>
>     On server A it takes 20 minutes to execute the script.
>     On server B it takes more than 20 hours. (Seems to be stuck with
>     create index and and create foreign key steps)
>
>     Any guidance to troubleshoot this would be highly appreciated.
>
>     Thanks & Regards,
>     Sumeet Shukla
>
>
> Check for long running queries on the server that is taking longer. If 
> it's things like CREATE INDEX or ALTER TABLE statements that are being 
> blocked, a transaction running on the table involved will cause those 
> commands to be held until those transactions complete.
>
> If it's normal read/write queries to that are taking longer, ensure 
> the database statistics are up to date by running an analyze.
>
> Keith

view thread (7+ messages)  latest in thread

Message-ID: <084c7a84-5035-10b7-80a0-f5c19968c485@gmail.com>
Permalink:  ../084c7a84-5035-10b7-80a0-f5c19968c485@gmail.com/
Also on:    postgresql.org/message-id/084c7a84-5035-10b7-80a0-f5c19968c485@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: asotolongo@gmail.com, keith@keithf4.com, sumeet.k.shukla@gmail.com, pgsql-performance@postgresql.org
  Subject: Re: [PERFORM] 2 server with same configuration but huge difference in performance
  In-Reply-To: <084c7a84-5035-10b7-80a0-f5c19968c485@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox