Re: Gained %20 performance after disabling bitmapscan

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Yavuz Selim Sertoglu <yavuzselim(dot)sertoglu(at)medyasoft(dot)com(dot)tr>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Gained %20 performance after disabling bitmapscan
Date: 2018-10-19 13:44:55
Message-ID: 20181019134455.GI24215@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Oct 19, 2018 at 07:19:12AM +0000, Yavuz Selim Sertoglu wrote:
> I have a problem with my query. Query always using parallel bitmap heap scan. I've created an index with all where conditions and id but query does not this index and continue to use bitmapscan. So I decided disable bitmap scan for testing. And after that, things became strange. Cost is higher, execution time is lower.
> But I want to use index_only_scan because index have all column that query need. No need to access table.
> It is doing index_only_scan when disabling bitmap scan but I cannot disable bitmap scan for cluster wide. There are other queries...

My first comment is that bitmap IOS is supported on PG11, which was
released..yesterday:

https://www.postgresql.org/docs/11/static/release-11.html
|Allow bitmap scans to perform index-only scans when possible (Alexander Kuzmenkov)

Also, I wonder whether parallel query is helping here or hurting (SET
max_parallel_workers_per_gather=0)? If it's hurting, should you adjust cost
parameters or perhaps disable it globally ?

Justin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2018-10-19 13:52:04 Re: Gained %20 performance after disabling bitmapscan
Previous Message Yavuz Selim Sertoglu 2018-10-19 07:19:12 Gained %20 performance after disabling bitmapscan