On 13.4.2012 18:14, xlash wrote:
> I have a big table ~15M records called entities. I want to find top 5
> entities matching "hockey" in their name.
Number of rows in not a very useful metric - if might be 15 MBs or 15
GBs, depending on the structure. We need to know at least this:
select relpa
I have a big table ~15M records called entities. I want to find top 5
entities matching "hockey" in their name.
I have a Full text index built for that, which is used :
gin_ix_entity_full_text_search_name, which indexes the name.
Query
SELECT "entities".*,
ts_rank(to_tsvector('english'