pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Alexander Stoddard <alexander.stoddard@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Accounting for between table correlation
Date: Fri, 15 Jan 2021 11:54:53 -0800
Message-ID: <a58abd0b-da39-b7fe-c6bb-62f2dff195c4@aklaver.com> (raw)
In-Reply-To: <CADDNc-BpM_ozi60E4qfbO_0dSJu+JhNfsQU9H=8QX6gowhFu2w@mail.gmail.com>
References: <CADDNc-B=spVE0FjJEOUEsGo+ChvvkPjyLZk+MV-YHz80Fo4BCw@mail.gmail.com>
	<b804bb4e-8f7b-d391-8827-a82b137321e8@gmail.com>
	<CA+ONtZ4+HhQmouVGi5+E_G5LgZoYnBqhvXJQBM=HxWm+zcSenw@mail.gmail.com>
	<f21e04a3-33e7-caa4-6044-5931bf231b79@gmx.net>
	<CAKFQuwYCoqUkNTe3jjXr5ThCv-xw70uEwST97xXGnm9zS-A0aA@mail.gmail.com>
	<CADDNc-B7fHboEt8NZk4PPcXL6KmEpY9qgXywPs656_h_FThBWQ@mail.gmail.com>
	<65a6db71-9182-1f0a-02c7-39cd011b34dd@aklaver.com>
	<CADDNc-BpM_ozi60E4qfbO_0dSJu+JhNfsQU9H=8QX6gowhFu2w@mail.gmail.com>

On 1/15/21 10:49 AM, Alexander Stoddard wrote:

Please reply to list also.
Ccing list.

> 
>     So to be clear, the process imports the data, then you run a query and
>     it completes in x time, you then ANALYZE the same data and it runs in y
>     time. Is that correct?
> 
> The process imports data, ANALYZE is run and then queries run in x time.
> A subsequent ANALYZE, may or may not, change the time to y.
> x may be greater or less than y for any given pair of runs, and the 
> difference is vast. Two very different performance domains, due to the 
> plan, I believe. If I am correctly reading the EXPLAIN plans the row 
> estimates are always way off (and low), regardless of if a high or low 
> performing plan is actually chosen.

Well I'm going to say this is not going to get a useful answer without 
some concrete numbers. Too many variables involved to just start 
guessing at solutions.

> 
> Thank you,
> Alex


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (18+ messages)  latest in thread

Message-ID: <a58abd0b-da39-b7fe-c6bb-62f2dff195c4@aklaver.com>
Permalink:  ../a58abd0b-da39-b7fe-c6bb-62f2dff195c4@aklaver.com/
Also on:    postgresql.org/message-id/a58abd0b-da39-b7fe-c6bb-62f2dff195c4@aklaver.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, alexander.stoddard@gmail.com
  Subject: Re: Accounting for between table correlation
  In-Reply-To: <a58abd0b-da39-b7fe-c6bb-62f2dff195c4@aklaver.com>
  References: <CADDNc-B=spVE0FjJEOUEsGo+ChvvkPjyLZk+MV-YHz80Fo4BCw@mail.gmail.com> <b804bb4e-8f7b-d391-8827-a82b137321e8@gmail.com> <CA+ONtZ4+HhQmouVGi5+E_G5LgZoYnBqhvXJQBM=HxWm+zcSenw@mail.gmail.com> <f21e04a3-33e7-caa4-6044-5931bf231b79@gmx.net> <CAKFQuwYCoqUkNTe3jjXr5ThCv-xw70uEwST97xXGnm9zS-A0aA@mail.gmail.com> <CADDNc-B7fHboEt8NZk4PPcXL6KmEpY9qgXywPs656_h_FThBWQ@mail.gmail.com> <65a6db71-9182-1f0a-02c7-39cd011b34dd@aklaver.com> <CADDNc-BpM_ozi60E4qfbO_0dSJu+JhNfsQU9H=8QX6gowhFu2w@mail.gmail.com> <a58abd0b-da39-b7fe-c6bb-62f2dff195c4@aklaver.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