From 69d78591b274704cd81e43e25a6c47876e1c7a8b Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Tue, 12 Jul 2022 11:13:44 -0400 Subject: [PATCH 1/2] ANALYZE db for better performance --- docs/fcs_migration/02-fcs-catalog-db-restore.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/fcs_migration/02-fcs-catalog-db-restore.sh b/docs/fcs_migration/02-fcs-catalog-db-restore.sh index e18df97..99ea32b 100755 --- a/docs/fcs_migration/02-fcs-catalog-db-restore.sh +++ b/docs/fcs_migration/02-fcs-catalog-db-restore.sh @@ -69,8 +69,11 @@ cf rename-service "$catalog_db_migrate" catalog-db cf unbind-service catalog catalog-db-venerable cf bind-service catalog catalog-db -# # Upgrade DB and reindex SOLR +# # Upgrade and analyze DB, and reindex SOLR cf scale catalog -i 0 cf run-task catalog -c "ckan db upgrade" +cf connect-to-service backup-manager catalog-db << EOF +ANALYZE; +EOF cf scale catalog -i 2 cf run-task catalog -c "ckan search-index rebuild -i -o -e" --name search-index-rebuild -k 2G -m 2G From b1bff5a3335a5ef9cc33b80a0a7801e9cb3b1e56 Mon Sep 17 00:00:00 2001 From: nickumia-reisys <85196563+nickumia-reisys@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:25:50 -0400 Subject: [PATCH 2/2] Update docs/fcs_migration/02-fcs-catalog-db-restore.sh --- docs/fcs_migration/02-fcs-catalog-db-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fcs_migration/02-fcs-catalog-db-restore.sh b/docs/fcs_migration/02-fcs-catalog-db-restore.sh index 99ea32b..1ccadba 100755 --- a/docs/fcs_migration/02-fcs-catalog-db-restore.sh +++ b/docs/fcs_migration/02-fcs-catalog-db-restore.sh @@ -76,4 +76,4 @@ cf connect-to-service backup-manager catalog-db << EOF ANALYZE; EOF cf scale catalog -i 2 -cf run-task catalog -c "ckan search-index rebuild -i -o -e" --name search-index-rebuild -k 2G -m 2G +cf run-task catalog -c "ckan search-index rebuild -i -o" --name search-index-rebuild -k 2G -m 2G