Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Super Slow & Reasonably Accurate Full-Text Search in PostgreSQL
EXPLAIN ANALYZE SELECT story_url, count(*) as count, max(updated_at) as updated_at
FROM "comments"
WHERE ("comments"."updated_at" BETWEEN '2018-01-01' AND '2018-07-07')
AND (to_tsvector('english', comment_text) @@ to_tsquery('english', 'google'))
GROUP BY story_url HAVING (count(*) > '7')
ORDER BY count DESC LIMIT 15;
Planning time: 0.276 ms
Execution time: 152242.143 ms
/* WHERE ("comments"."updated_at" BETWEEN '2018-07-01' AND '2018-07-06') */
https://medium.com/@serverpunch/why-you-should-not-use-google-cloud-75ea2aec00de | 94 |
2018-07-01 01:39:39 | 2018-07-01 20:25:09
https://github.com/harababurel/gcsf | 14 | 2018-07-01 04:30:09 | 2018-07-01 19:20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.