In this PR we are storing the project IDs associated with the filtering query in a list of strings
query type projectids in buildProjectsSQL generates a list of Project IDs
We then run tileQuery with this ID list in the WHERE clause
We store this SQL query using node-cache (app.tileCache.set(tileId, tileSQL).
Before we were storing the fully query we used to generate the projects list, and we were using the same query as a subquery to generate tiles. Now we just store an array of projectIds which makes the tiles query go from ~1 second to ~0.2 seconds. Now a user can move around the map without changing the query.
In this PR we are storing the project IDs associated with the filtering query in a list of strings
query type
projectids
inbuildProjectsSQL
generates a list of Project IDsWe then run
tileQuery
with this ID list in the WHERE clauseWe store this SQL query using node-cache (
app.tileCache.set(tileId, tileSQL
).Before we were storing the fully query we used to generate the projects list, and we were using the same query as a subquery to generate tiles. Now we just store an array of projectIds which makes the tiles query go from ~1 second to ~0.2 seconds. Now a user can move around the map without changing the query.
Closes #501