Zero-ing Statistics


https://forum.kartris.com/Topic2102.aspx
Print Topic | Close Window

By kalkhovm - Fri 24 May 2013
Can you tell me the best way to Zero out the statistics, as currently the only way I can see to do this from within Kartris is to clear all product data and I really don't want to do that! Thanks
By Neil - Fri 24 May 2013
I use this sql to clear stats periodically (to keep the db size down)

EXEC [dbname].[dbo].[_spKartrisDB_DisableAllTriggers]
DELETE FROM [dbname].[dbo].[tblKartrisStatistics]
WHERE ST_ID > 8445782
GO
EXEC [dbname].[dbo].[_spKartrisDB_EnableAllTriggers]


You don't need to worry about triggers in V2 as these were removed. The ST_ID is the lowest you want to remove to.