pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: dbatoCloud Solution <dbatocloud17@gmail.com>
Cc: Bodo Greif <bodo@me.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: I need to complex Query - need big support
Date: Sat, 9 Jan 2021 13:06:27 -0500
Message-ID: <20210109180627.GA19575@momjian.us> (raw)
In-Reply-To: <CAEz7P_ts3OmtcBjWuwBWj+rMxYfr75tQ0MJ+NUTBtWzkuv0T0w@mail.gmail.com>
References: <CAEz7P_se27C1JSha5oFth89ad68o5VKzf7O0cNyquL2+UV5PKg@mail.gmail.com>
	<FB61D954-930E-457C-AC9A-59A69B3FBABB@me.com>
	<CAEz7P_ts3OmtcBjWuwBWj+rMxYfr75tQ0MJ+NUTBtWzkuv0T0w@mail.gmail.com>

On Sat, Jan  9, 2021 at 11:30:12PM +0530, dbatoCloud Solution wrote:
> Hi Bodo,
> 
> I have resolved this complex query by doing small changes. What I observed the
> optimizer choosing nested loop join and the storage type is in AWS EBS type. So
> I decided to make random_page_cost=0 also I collected stats + vacuumed as I
> said before plus now the query performing very good and I made it down from 23
> minutes into 3 minutes and 15 sec. 

We usually recommend random_page_cost=1.1 for storage where the random
page cost is similar to the sequential cost (which is 1.0).

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






view thread (3+ messages)

Message-ID: <20210109180627.GA19575@momjian.us>
Permalink:  ../20210109180627.GA19575@momjian.us/
Also on:    postgresql.org/message-id/20210109180627.GA19575@momjian.us

 · 

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: bruce@momjian.us, dbatocloud17@gmail.com, bodo@me.com
  Subject: Re: I need to complex Query - need big support
  In-Reply-To: <20210109180627.GA19575@momjian.us>

* 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