Sometimes the biggest bottleneck in the SAP business One setup is SQL server. Here is a query to check for fragmentation.
SELECT
i.name 'index',
s.name 'schema',
t.name 'table',
p.avg_fragmentation_in_percent,
p.index_type_desc,
p.record_count
FROM sys.dm_db_index_physical_stats ( DB_ID(), NULL, NULL, NULL, 'DETAILED') as p
JOIN sys.indexes as i on p.object_id = i.object_id and p.index_id = i.index_id
JOIN sys.tables as t on t.object_id = p.object_id
JOIN sys.schemas as s on s.schema_id = t.schema_id
WHERE p.index_id > 0
ORDER BY p.avg_fragmentation_in_percent DESC
Got this query from the vission33 channel on YouTube
http://www.youtube.com/watch?v=B3_LQetPxjI
Credit to them and Maxim Michtchenko.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |