pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Erratically behaving query needs optimization
Date: Thu, 22 Aug 2019 10:43:10 -0700 (MST)
Message-ID: <1566495790294-0.post@n3.nabble.com> (raw)
In-Reply-To: <CAB14va9Mt4QVV_aR3rXxvaVyGNjB-5TpK6FSHAmdfMMu+PL-GA@mail.gmail.com>
References: <CAB14va-2iukzjQyA6rBQfeQuMMbd8Z+f22fvM3H9k+PxKa-_sw@mail.gmail.com>
	<9736f758-d702-ee9a-2988-53762c73c3e3@siscobra.com.br>
	<CAB14va_b+mCmZrp1R_FHgcp54HQ+Vq9e=MMg22DYLvWqb0XQTQ@mail.gmail.com>
	<827127b6-c034-b53b-5c2d-aa04743298d2@siscobra.com.br>
	<CAB14va_8pxe20vcroB9nyhmWSw=jBqAZxd6G54uE-xTpKR1yEg@mail.gmail.com>
	<de19053e-5d69-6bd9-0d48-62475283e8a4@siscobra.com.br>
	<CAB14va8TnWBkLYUAt6YhfwnOU+RMOvQmJzeJMsnadt2G58aitg@mail.gmail.com>
	<CAB14va9Mt4QVV_aR3rXxvaVyGNjB-5TpK6FSHAmdfMMu+PL-GA@mail.gmail.com>

Hello,

1/ access scheduler_task_executions 
	by index with device_id = 97
seems ok

2/ 
I don't understand why 
joining
scheduler_task_executions.id=scheduler_operation_executions.task_execution_id
is done using a parallel hash join 
when a nested loop would be better (regarding the number of rows involved)

maybe because index on scheduler_operation_executions.task_execution_id

    "index_task_execution_id_desc" btree (task_execution_id DESC NULLS LAST)

is not usable or bloated or because of DESC NULLS LAST ?


3/ join with results.operation_execution_id
	by index
seems OK

Regards
PAscal



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-performance-f2050081.html





view thread (15+ messages)  latest in thread

Message-ID: <1566495790294-0.post@n3.nabble.com>
Permalink:  ../1566495790294-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1566495790294-0.post@n3.nabble.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-performance@postgresql.org
  Cc: legrand_legrand@hotmail.com
  Subject: Re: Erratically behaving query needs optimization
  In-Reply-To: <1566495790294-0.post@n3.nabble.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