Re: Inquiry on Generating Bitmaps from Filter Conditions in Index Scans

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Jinjing Zhou <allenzhou(at)tensorchord(dot)ai>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Inquiry on Generating Bitmaps from Filter Conditions in Index Scans
Date: 2023-11-20 10:51:47
Message-ID: 318a9a96-f7f6-1eea-af99-2ad53e544538@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/19/23 18:19, Jinjing Zhou wrote:
> 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!
>

I suppose you'll need to give more details about what exactly are you
trying to achieve, what you tried, maybe some code examples, etc. Your
question is quite vague, and it's unclear what "bitmaps generated on
filter conditions" or "custom index" means.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-11-20 10:58:01 Re: Synchronizing slots from primary to standby
Previous Message Laurenz Albe 2023-11-20 10:35:15 Re: Use of backup_label not noted in log