I've been looking into index fragmentation recently not just to determine if the index needs to be rebuilt but also how efficient it is *right now* structurally speaking. I've also been comparing to other DBMSs such as Oracle RDBMS 12, SQL Server 2012 and IQ. Since I'm writing to a Sybase oriented group of people, I'll keep my comparisons on Sybase .. er.. SAP products.
In IQ, I can easily pull up a histogram of useful metrics regarding the 'fragmentation', well one type of fragmentation anyways, of indexes.
In ASE, we don't have anything that can retrieve similar metrics without walking the index tree(s) - remember with symantec partitioned tables, you can actually have more than one index tree (local indexes).
We do have the various index metrics produced by update but they provide a single number that doesn't give us a clear picture where the (insert type of) fragmentation really resides.
White Sands Technology has ProActive DBA which can do this but it has the same issue as if I scan the index tree(s) myself. The operation is expensive. Damn expensive. Sure, I can do a binary copy of the ASE server and run the analysis on another box, but by the time that is done, the window of action (maintenance window or whatever) may have passed. Worse yet, it might be a mission critical 24x7 server with no maintenance window to speak of.
White Sands Technology has an excellent, dated but excellent, white paper on fragmentation. I strongly recommend reading that to understand the difference between the various types of fragmentation in ASE .. and in databases in general.
There are a myriad of reasons why you would want to find exactly where that fragmentation is hiding.
Fixing the fragmentation, if it is actually a problem, may be as simple as rebuilding the index (reorg or drop/create) or changing the order of the keys or fill factor, or some other option.
My question is thus: Would you like to see SAP add more detail to the fragmentation metrics? If so, would you be willing to share the reason why?
p.s. David Cherin, can you bug someone to update that white paper to 15.7? Pretty please?