diff --git a/doc/release-notes/7398-saved-search-performance.md b/doc/release-notes/7398-saved-search-performance.md index e37fb2923cd..4986524ed4f 100644 --- a/doc/release-notes/7398-saved-search-performance.md +++ b/doc/release-notes/7398-saved-search-performance.md @@ -8,18 +8,18 @@ A refactoring has greatly improved Saved Search performance in the application. ### DB Cleanup for Saved Searches -A previous version of dataverse changed the indexing logic so that when a user links a dataverse, its children are also indexed as linked. This means that the children to not need to be separately linked, and in this version we removed the logic that creates a saved search to create those links when a dataverse is linked. +A previous version of dataverse changed the indexing logic so that when a user links a dataverse, its children are also indexed as linked. This means that the children do not need to be separately linked, and in this version we removed the logic that creates a saved search to create those links when a dataverse is linked. We recommend cleaning up the db to a) remove these saved searches and b) remove the links for the objects. We can do this via a few queries, which are available in the folder here: https://github.com/IQSS/dataverse/raw/develop/scripts/issues/7398/ -There are four queries available, and they should be run in this order: +There are four sets of queries available, and they should be run in this order: - ss_for_deletion.txt to identify the Saved Searches to be deleted - delete_ss.txt to delete the Saved Searches identified in the previous query - dld_for_deletion.txt to identify the linked datasets and dataverses to be deleted -- delete_dld.txt to delete the linked datasets and dataverses identified in the previous query +- delete_dld.txt to delete the linked datasets and dataverses identified in the previous queries Note: removing these saved searches and links should not affect what users will see as linked due to the aforementioned indexing change. Similarly, not removing these saved searches and links should not affect anything, but is a cleanup of unnecessary rows in the database. @@ -27,4 +27,4 @@ Note: removing these saved searches and links should not affect what users will X\. (Optional, but recommended) DB Cleanup -Perform the DB Cleanup for Saved Searches and Linked Objects, summarized in the "Notes for Dataverse Installation Administrators" section above. \ No newline at end of file +Perform the DB Cleanup for Saved Searches and Linked Objects, summarized in the "Notes for Dataverse Installation Administrators" section above. diff --git a/scripts/issues/7398/dld_for_deletion.txt b/scripts/issues/7398/dld_for_deletion.txt index 9619de1acee..51aa9ce1458 100644 --- a/scripts/issues/7398/dld_for_deletion.txt +++ b/scripts/issues/7398/dld_for_deletion.txt @@ -1,5 +1,6 @@ --- this query will show you the linked objects that will get deleted +-- these queries will show you the linked objects that will get deleted +-- datasets select dld.dataset_id, dvo.owner_id, dld.linkingdataverse_id, dvld.dataverse_id, dvld.linkingdataverse_id from datasetlinkingdataverse dld, dvobject dvo, dataverselinkingdataverse dvld @@ -8,6 +9,7 @@ and dld.linkingdataverse_id = dvld.linkingdataverse_id and dvo.owner_id = dvld.dataverse_id order by dld.linkingdataverse_id; +-- dataverses select dld.dataverse_id, dvo.owner_id, dld.linkingdataverse_id, dvld.dataverse_id, dvld.linkingdataverse_id from dataverselinkingdataverse dld, dvobject dvo, dataverselinkingdataverse dvld