Re: Postgres performance comparing GCP and AWS

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Maurici Meneghetti <maurici(dot)meneghetti(at)bixtecnologia(dot)com(dot)br>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org, Igor Gois <igor(at)bixtecnologia(dot)com(dot)br>
Subject: Re: Postgres performance comparing GCP and AWS
Date: 2021-02-24 13:35:12
Message-ID: CAOBaU_ZNF+uE8OED3GbLYEuJULJRAYcR1fkW=dFjB57HVr6P1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

On Wed, Feb 24, 2021 at 6:14 AM Maurici Meneghetti
<maurici(dot)meneghetti(at)bixtecnologia(dot)com(dot)br> wrote:
>
> I have 2 postgres instances created from the same dump (backup), one on a GCP VM and the other on AWS RDS. The first instance takes 18 minutes and the second one takes less than 20s to run this simples query:
> SELECT "Id", "DateTime", "SignalRegisterId", "Raw" FROM "SignalRecordsBlobs" WHERE "SignalSettingId" = 103 AND "DateTime" BETWEEN '2019-11-28T14:00:12.540200000' AND '2020-07-23T21:12:32.249000000';
> I’ve run this query a few times to make sure both should be reading data from cache.
> I expect my postgres on GPC to be at least similar to the one managed by AWS RDS so that I can work on improvements parallelly and compare.
>
> DETAILS:
> [...]
> Planning time: 456.315 ms
> Execution time: 776.976 ms
>
> Query explain for Postgres on AWS RDS:
> [...]
> Planning time: 0.407 ms
> Execution time: 14.87 ms

Those queries were executed in respectively ~1s and ~15ms (one thing
to note is that the slower one had less data in cache, which may or
may note account for the difference). Does those plans reflect the
reality of your slow executions? If yes it's likely due to quite slow
network transfer. Otherwise we would need an explain plan from the
slow execution, for which auto_explain can help you. See
https://www.postgresql.org/docs/11/auto-explain.html for more details.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Igor Gois 2021-02-24 15:11:30 Re: Postgres performance comparing GCP and AWS
Previous Message Milos Babic 2021-02-24 13:15:36 Re: Postgres performance comparing GCP and AWS