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

Row store internal pages copy keys on page-in

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.6.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      When we read a row store internal page into cache we always copy all the keys whether or not prefix compression is enabled. This can cause us to use more cache than necessary, and potentially requires many allocations.

      The relevant code is at:
      src/btree/bt_page.c:509

                      /*
                       * Allocate and initialize the instantiated key.
                       *
                       * Note: all keys on internal pages are instantiated, we assume
                       * they're more likely to be useful than keys on leaf pages.
                       * It's possible that's wrong (imagine a cursor reading a table
                       * that's never randomly searched, the internal page keys are
                       * unnecessary).  If this policy changes, it has implications
                       * for reconciliation, the row-store reconciliation function
                       * depends on keys always be instantiated.
                       */
                      WT_ERR(__wt_row_ikey(session,
                          WT_PAGE_DISK_OFFSET(page, cell),
                          current->data, current->size, &ref->u.key));
      

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            alexander.gorrod@mongodb.com Alexander Gorrod
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: