Re: different execution time for the same query (and same DB status)

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Michel SALAIS <msalais(at)msym(dot)fr>, Francesco De Angelis <franc(dot)tozzus(at)gmail(dot)com>, Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: different execution time for the same query (and same DB status)
Date: 2021-03-08 17:03:25
Message-ID: CAHOFxGrH7B8G2U5GiLFL4GmwF4V4bMtH6xk+SEmg4BsixijmxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

You don't mention shared_buffers, which is quite low by default. Not sure
of the memory of your docker container, but it might be prudent to increase
shared_buffers to keep as much data as possible in memory rather than
needing to read from disk by a second run. To test the possibility Tom Lane
suggested, do a manual analyze after data insert to see if it is also slow.
Explain (analyze, buffers) select... and then using
https://explain.depesz.com/ or https://tatiyants.com/pev/#/plans/new would
be a good option to have some visualization on where the query is going off
the rails.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Nagaraj Raj 2021-03-08 23:30:14 Users grants with setting options
Previous Message Laurenz Albe 2021-03-08 09:17:59 Re: Slow query performance inside a transaction on a clean database