FR version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 119 words in the discussion.
Trending Topics
#order#solution#entry#user#limit#gist#handles#large#search#still

Discussion (5 Comments)Read Original on HackerNews
create table entry (id, user, entry_date, entry_text);
select * from entry where user = ? and entry_date <= ? and entry_text matches ? order by entry_date desc limit ?;
(eg. page through the list of financial transactions with description matching some criteria, latest first)
So far only GIST with pg_trgm handles that without the need to sort large result sets.
EDIT: or I misunderstood the question. GIST+trgm works but its search capabilities are limited, it does not handle "order by column" so requires weird workarounds, and it is not very efficient.