I need some advice.
In SQLite I optimize the database with
DB.SQLExecute("VACUUM;") 'Speicher freigeben und Datenbank defragmentieren / rebuild database file, repacking it into a minimal amount of disk space
DB.SQLExecute("ANALYZE;") 'Zugriffspfade optimieren / gather statistics for optimization of queries
To do the same in MS SQL Server, I try to optimize the database like this:
// Speicher freigeben und Datenbank defragmentieren / rebuild database file, repacking it into a minimal amount of disk space
DB.ExecuteSQL("DBCC SHRINKDATABASE('"+DB_Name+"') TRUNCATEONLY;")
// Zugriffspfade optimieren / gather statistics for optimization of queries
DB.ExecuteSQL("ANALYZE TABLES COMPUTE STATISTICS;")
Is this correct and/or am I missing something?
At the moment I can’t test my MS SQL Server DB because I’m still waiting for the ODBCDatabase to be corrected (Xojo 2024r1 with #75322)!