Improve estimation of WT number of pages in buffer

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This change modifies the `CatalogStats` struct to store cache size in bytes rather than pages, and introduces a new method `numPagesInStorageEngineCache()` that calculates the number of pages dynamically based on collection-specific page sizes. We found that different collections have can have differences in the average size of leaf pages, meaning that our estimate of the number of pages that can fit in the WT cache should depend on which collection we are probing into.

      • Replaced `numPagesInStorageEngineCache` field with `bytesInStorageEngineCache` in `CatalogStats`
      • Added `numPagesInStorageEngineCache()` method that computes pages using actual collection page sizes instead of assuming a fixed 32KiB page size
      • Updated cost estimation calls in `JoinCostEstimatorImpl` to use the new method

      This provides more accurate cost estimation by accounting for varying page sizes across different collections rather than using a hardcoded assumption.

            Assignee:
            Ben Shteinfeld
            Reporter:
            Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: