Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Optimize source database size #49

Open
Woland2k opened this issue Sep 23, 2020 · 1 comment
Open

Optimize source database size #49

Woland2k opened this issue Sep 23, 2020 · 1 comment
Assignees

Comments

@Woland2k
Copy link
Contributor

Here are techniques used to optimize source database making sure it has a the lowest size and thus will take less time to initialize:

  1. vc-empty-db had a 6mb "sys.plan_persist_runtime_stats", probably from the previous db run. In order to remove the data from that table, run the following command:

ALTER DATABASE [vc-empty-db] SET QUERY_STORE CLEAR;

  1. Database has a size it occupies on the disk as well as a claimed size. The claimed size is never reduced even when the data is removed. In order to re-claim unused space, the following command needs to be run:

DBCC SHRINKDATABASE (N'vc-empty-db')

@mvktsk
Copy link
Contributor

mvktsk commented Sep 23, 2020

Task https://virtocommerce.atlassian.net/browse/VP-5095 has been created

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants