Re: Bitmap and-ing between btree and gin? - Mailing list pgsql-performance

From Tom Lane
Subject Re: Bitmap and-ing between btree and gin?
Date
Msg-id 17855.1454602121@sss.pgh.pa.us
Whole thread Raw
In response to Bitmap and-ing between btree and gin?  (Jordi <jmaillists@promani.be>)
Responses Re: Bitmap and-ing between btree and gin?  (Jordi <jmaillists@promani.be>)
List pgsql-performance
Jordi <jmaillists@promani.be> writes:
> I've been trying to get a query use indexes and it has raised a doubt
> whether pgsql supports bitmap and-ing between a multi-column btree index
> and a gin index.

Sure.  But such a plan would give an unordered result, meaning that we'd
have to process the whole table before doing the ORDER BY/LIMIT.  The
planner evidently thinks that it's better to try to process the rows in
ID order so it can stop as soon as it's got 100.  If it's wrong about
that, that's likely because it's got a bad estimate of the selectivity of
the other WHERE conditions.  You might see if you can improve the
statistics for the search_vector column.

            regards, tom lane


pgsql-performance by date:

Previous
From: Jordi
Date:
Subject: Bitmap and-ing between btree and gin?
Next
From: Jordi
Date:
Subject: Re: Bitmap and-ing between btree and gin?