Inquiry on Generating Bitmaps from Filter Conditions in Index Scans

From: "Jinjing Zhou" <allenzhou(at)tensorchord(dot)ai>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Inquiry on Generating Bitmaps from Filter Conditions in Index Scans
Date: 2023-11-19 17:19:33
Message-ID: 638a161a379d27580cde9bc3c59611440e99861f.459c6c87.fc85.4e57.88a6.c5b49a7e565e@feishu.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers, 

I hope this message finds you well. I am reaching out to seek guidance on a specific aspect of PostgreSQL's index scanning functionality.

I am currently working on a vector search extension for postgres, where I need to generate bitmaps based on filter conditions during an index scan. The goal is to optimize the query performance by efficiently identifying the rows that meet the given criteria.

The query plan looks like this
> Index Scan using products_feature_idx on products  (cost=0.00..27.24 rows=495 width=12)
>          Order By: (feature <-> '[0.5, 0.5, 0.5]'::vector)
>          Filter: ((price > '0.2'::double precision) AND (price <= '0.7'::double precision))

We have a custom index for the order by clause on the feature column. Now we want to utilize the index on other columns like price column. We want to access the bitmap of price column's filter condition in the feature column index. Is there any way I can achieve this goal?

Any help or guidance is appreciated!

Thanks.
Jinjing Zhou

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-11-19 20:12:44 Re: XX000: tuple concurrently deleted during DROP STATISTICS
Previous Message Andrey M. Borodin 2023-11-19 07:09:18 Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock