Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Create pg_trgm index on boundary_huc* tables to speed up search #3207
This PR adds the pg_trgm extension and creates indexes on the
See this blog post about speeding up the LIKE operator with the
With the index, I still have seen some slow-ish database query times - but this seems to be on startup, and after a bit of warm up time the queries come back quite fast.
rajadain left a comment •
+1 tested. Much faster after the warm-up. Do you have any ideas / recommendations for what can be done about the cold start? Do you know if it is the database query that's the bottleneck or something else (like establishing a database connection) holding it back for the first request?
I was seeing longer query times on cold startup, so it seems like potentially an index caching issue? I don't have a recommendation for a workaround - we could perform a few queries against the database to warm it up on startup, but that would introduce some deployment and maintenance complexity that might not be worth it.