AssetCloud On-Premise & InventoryCloud On-Premise can develop slow performance over time. You can run some SQL scripts in SQL Server Management Studio to improve performance. It's best to run these scripts when end users are not actively using the system.
1. Disconnect any connection to the Wasp databases to prevent interference. Make a new query, copy/paste the following script into the window, then click the Execute button in the toolbar.
-- Make sure no one is running anything against the Wasp databases
USE [master];
DECLARE @kill varchar(8000) = '';
SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), session_id) + ';' FROM sys.dm_exec_sessions
WHERE database_id in ( db_id('WaspTrack'), db_id('WaspConfig'), db_id('WaspAuth'))
EXEC(@kill);
-- Make sure no one is running anything against the Wasp databases
2. Find the Wasp Stored Procedures we'll be working with, spWaspBarcodeInternalDefragTenant and spWaspBarcodeInternalRecompileStatistics. Expand Databases, WaspTrack, Programmability, Stored Procedures, then scroll down to the bottom of that section.
3. Right-click spWaspBarcodeInternalDefragTenant , then Execute Stored Procedure.
4. Check the first and third checkboxes, and type a 1 in the second and fourth Value, as shown below. Click OK, and wait until the procedure completes.
5. Right-click spWaspBarcodeInternalRecompileStatistics, then Execute Stored Procedure. Check both checkboxes as shown below. Click OK, and wait until the procedure completes.
This procedure is complete.