Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1733

wt stat confusion for "number of key/value pairs"


    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.5.2
    • Labels:


      After creating a btree with 279 entries, wt dump shows 279 entries, and wt stat reports 281 for btree: number of key/value pairs. The difference arises because entries in internal pages that point to subordinate pages are counted in this statistic. The btree for this case looks like this:

        Internal page
         /        \
      Leaf       Leaf

      We show:

        btree: number of key/value pairs=281
        btree: row-store internal pages=1
        btree: row-store leaf pages=2

      To get the "right" answer in a row store with current stat output, one needs to calculate: E - I - L + 1, where:

      E  == btree: number of key/value pairs
      I  == btree: row-store internal pages
      L  == btree: row-store leaf pages

      Or are there more factors to consider to get an accurate view? At any rate, this seems confusing and makes it harder to use wt stat as a quick diagnostic tool. It came up as part of SUPPORT-1248.


          Issue Links



              • Assignee:
                donald.anderson Donald Anderson
                donald.anderson Donald Anderson
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: