Re: Slow "not in array" operation

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Marco Colli <collimarco91(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Slow "not in array" operation
Date: 2019-11-12 19:20:10
Message-ID: CAHOFxGpt73epD-gYH32u9pOZJkvEO=iNstGJ+jkSkd59LuEtMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

It is very interesting to me that the optimizer chose a parallel sequential
scan rather than an index scan on either of your indexes that start
with project_id that also reference trashed_at.

1) Are you running on SSD type storage? Has random_page_cost been lowered
to 1-1.5 or so (close to 1 assumes good cache hits)?
2) It seems you have increased parallel workers. Have you also changed the
startup or other cost configs related to how inclined the system is to use
sequential scans?
3) If you disable sequential scan, what does the plan look like for this
query? (SET ENABLE_SEQSCAN TO OFF;)

>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pryzby 2019-11-12 19:53:34 Re: Slow "not in array" operation
Previous Message Marco Colli 2019-11-12 19:04:15 Re: Slow "not in array" operation