Re: Slow Bitmap Index Scan - Mailing list pgsql-performance

From Alan Hodgson
Subject Re: Slow Bitmap Index Scan
Date
Msg-id 1543863089.8141.15.camel@lists.simkin.ca
Whole thread Raw
In response to Re: Slow Bitmap Index Scan  (Scott Rankin <srankin@motus.com>)
List pgsql-performance
On Mon, 2018-12-03 at 18:41 +0000, Scott Rankin wrote:
Upon further analysis, this is - unsurprisingly - taking place when we have multiple prefixed search terms in a ts_query going against a tsvector index.

We have roughly 30 million rows in the table, and the search column is basically a concatenation of a location's name (think "Walmart #123456") and its street address.

We use these searches mostly for autocompleting of a location search.  So the search for that record above might be "Walmart 123", which we change to be to_tsquery('walmart:* &123:*').  We prefix both terms to correct for misspellings or lazy typing.

Is it unrealistic to think that we could have sub-1000ms searches against that size of a table?


We've found trigram indexes to be much faster and more useful for these types of searches than full-text.


Might be worth a try, if you haven't tested them before.

pgsql-performance by date:

Previous
From: Scott Rankin
Date:
Subject: Re: Slow Bitmap Index Scan
Next
From: Alvaro Herrera
Date:
Subject: Re: Query with high planning time at version 11.1 compared versions10.5 and 11.0