Statistics are an option that you can enable for your Microsoft SQL Server Database that automatically collections information about data distribution within tables and indexes, query patterns, query results, and the like. You should gather statistics so that you can optimize your interactions with your P6 EPPM database.
For example, gathering statistics can help you recognize and resolve the following issues:
For more information about enabling statistics gathering in your Microsoft SQL Server Database, refer to Introduction to the Statistics in SQL Server article in the Microsoft documentation library.
To gather statistics for all of the P6 EPPM tables:
exec sp_updatestats
To gather statistics for the PROJECTS and TASKS tables:
update statistics project with fullscan ,all
update statistics task with fullscan ,all
To determine the last time statistics were gathered per index and table:
SELECT OBJECT_NAME(A.object_id) AS Object_Name, A.name AS index_name, STATS_DATE(A.OBJECT_ID, index_id) AS StatsUpdated,
DATEDIFF(d,STATS_DATE(A.OBJECT_ID, index_id),getdate()) DaysOld
FROM sys.indexes A
INNER JOIN sys.tables B ON A.object_id = B.object_id
WHERE A.name IS NOT NULL
ORDER BY DATEDIFF(d,STATS_DATE(A.OBJECT_ID, index_id),getdate()) DESC
Legal Notices
Copyright © 1999, 2016,
Oracle and/or its affiliates. All rights reserved.
Last Published Friday, September 30, 2016