Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Table level statistics inaccuracy question

$
0
0

"Some statistics, particularly cluster ratios, may be slightly inaccurate because not all page allocations and deallocations are recorded during changes made by data modification queries. Run update statistics or create index to correct any inconsistencies."

 

I am curious in what condition table level statistics like DPCR became slightly inaccurate and why the document is mentioning 'not all page allocations and deallocations are recorded during changes made by data modification queries.' so i did some research from Note,google,old document.. and also raised to SAP support but I can only get partial answers without expaination, anyway below is my understanding/summary for Table level statistics inaccuracy based on my shallow knowledge, please correct me/share me some light on it:

 

For Table level statsitcs(pagecnt/SPUT/DPCR):

1. Flush happens periodically by Housekeeper process.

2. Flush can also be triggered before scavenge process, but it's not guaranteed as deadlock can be happened.

If deadlock happened and after scavenge, and if DES is gone from cache, the new pagecnt can't be flushed into systabstats to reflect new value.

3. If a spin-lock on DES and at same time, first oam page for table is exclusively latched, pagecnt will not be flushed to systabstats this time, but can be flushed next time.

4. For performance reasons, the Tally Manager works in a non-transactional fashion, which can allow for some inaccuracy for some stats like pagecnt/dpcr.

-->I guess some page split happens during inserting but pagecnt should be recorded. But during roll-back, for perfromance purpose, those deleted pages is recorded with estimate values.

5. DES not in cache because of crashes: the new pagecnt can't be flushed to systabstats to reflect new value.

6. DES not in cache because of roll-backs: the new pagecnt can't be flushed to systabstats to reflect new value.

But I can't imagine how DES can be lost during roll-back..

7. SPUT "Space utilization uses the average row size and number of rows to compute the expected minimum number of data pages, and compares it to the current number of pages."

datarowsize is populated with an estimate which may be inaccurate, particularly if have variable width columns (for instance NULLable columns).

8. reorg rebuild will update accurate pagecnt, but does not update datarowsize in systabstats.

9. Updating the table statistics improves the datarowsize accuracy.

10. Spinlock contention on DES can slow down ASE but it's not the cause of inaccuracy.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>