Re: CPU Consuming query. Sequential scan despite indexing. - Mailing list pgsql-performance

From Michael Lewis
Subject Re: CPU Consuming query. Sequential scan despite indexing.
Date
Msg-id CAHOFxGpQBgMHV67wcYd4Kz6SeCPYd3KgSx0Hi4EaQtjQDZXqUw@mail.gmail.com
Whole thread Raw
In response to CPU Consuming query. Sequential scan despite indexing.  (aditya desai <admad123@gmail.com>)
List pgsql-performance
What version by the way? Do you get a faster execution if you disable sequential scan? Or set parallel workers per gather to 0? Your estimates look decent as do cache hits, so other than caching data or upgrading hardware, not sure what else there is to be done.

Although... you are hitting 70k blocks to read only 612k rows? Are these job records very wide perhaps, or do you need to do some vacuuming? Perhaps autovacuum is not keeping up and you could use some repacking or vacuum full if/when you can afford downtime. If you create a temp table copy of the job table, how does the size compare to the live table?

pgsql-performance by date:

Previous
From: aditya desai
Date:
Subject: CPU Consuming query. Sequential scan despite indexing.
Next
From: Laurenz Albe
Date:
Subject: Re: CPU Consuming query. Sequential scan despite indexing.