bcgov / BCHeritage_arches

BC Heritage Branch Arches configuration, schemas and extensions.
Apache License 2.0
3 stars 0 forks source link

947 - Modify csv export on the historic site search results #38

Closed jrods closed 4 months ago

jrods commented 5 months ago

Re: bcgov/BCHeritage#947

jrods commented 4 months ago

Did all the existing materialized views need to be dropped and recreated? I looks like at least some of drop/recreate statements are redundant (eg mv_borden_number - not sure how many others)- we should only necessary changes in the migration and not touch the objects that aren't modified. This will keep QA and changes more localized and easier to digest.

I wasn't sure what is within the deployed databases. If everything that is in the resource_views/0002_create_onerow_view.sql is in fact on the deploys, I can cut out the statements that are not modified in the mig module.

When first running this w/ 1500 records it took quite a while to run. Once the SQL is trimmed down to what is actually changing we can have a look to see where we can improve performance.

The original databc view before modifying was also about the same amount of run time, if I remembered correctly. I haven't done any analyzing of the hotspots yet but will have a look