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

Optimize lookaside table layout for prefix compression

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Prefix compression was enabled for the lookaside table in WT-3816, it may be possible to change the order of fields in the lookaside table to make prefix compression more effective:

         * The key is a unique marker for the page (a page ID plus a file ID, ordered
         * this way so that overall the lookaside table is append-mostly), a counter
         * (used to ensure the update records remain in the original order), and the
         * record's key (byte-string for row-store, record number for column-store).
      

      If we move the counter to the end of the lookaside table key, prefix compression should be more effective when there are repeated updates for the same record key. It may also help across different record keys if those keys have a common prefix.

      That said, this isn't definitely going to provide a benefit:

      With custom collation, the order of keys could be different in lookaside than on page. I don't know for sure that this is a problem but it at least needs thought; and
      there is a packing optimization when the last thing in a packed format is a 'u' (WT_ITEM): we avoid storing the length. That would be lost if we changed the column order, and would mean that prefix compression of record keys would only be effective for keys of the same length.

      We should create a test case and assess whether there is a benefit to changing the data layout.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                backlog-server-execution Backlog - Execution Team
                Reporter:
                alexander.gorrod Alexander Gorrod
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: