You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The easiest way to address the long running query on application startup is to increase the allowed connection time to sql server. This may be ideal, as the current process is useful for starting a dev environment
There are a couple SQL queries that may need to be optimized in the future if a large number of projects / deployments are added.
In particular, the SQL query for tracking / asserting the 'rollup' relationship of projects into various tenants can be slow when called without a submissionId parameter (this query - https://github.com/SAEON/national-climate-change-response-database/blob/stable/src/api/src/lib/sql/merge-tenants-submissions.js). It would be better to refactor the function to NOT allow for calling without submissionId. And then refactor code where this function is called to loop over submissionIds and only call the
mergeTenantsSubmissions
function with both params specified potentially many, many times. Alternatively it's possible to increase the SQL Server connection timeout settings - https://github.com/SAEON/national-climate-change-response-database/blob/stable/src/api/src/mssql/pool.js#L20. But that is not the best idea since this would result in longer and longer startup timesThe text was updated successfully, but these errors were encountered: