Connection incredibly slow
For a <100MB db, with <100 tables and approx. 1000 stored procedures (procedures are mostly coming from postgis, geometry, and other default functions, only 7% of the procedures are custom):
loadTables: average 750ms
loadFunctions: average 15000ms
Connection string used: postgres://user:pass@host:port/database?ssl=true
massive.connect is being called before each request, passing that string as connection string.
Therefore, massive.loadTables
(index.js
) is being called every time as well as massive.loadFunctions
This is performed from localhost, measured with console.time
and console.timeEnd
, and using pg.connect is almost instantaneous.
Am I missing something?
Extensions being used:
postgis_topology, postgis, plv8, plpgsql, topology, fuzzystrmatch