Skip to content
  • Andreas Brandl's avatar
    Implement TablesampleCountStrategy. · 6df99924ac6c
    Andreas Brandl authored
    A tablesample count executes in two phases:
    * Estimate table sizes based on reltuples.
    * Based on the estimate:
      * If the table is considered 'small', execute an exact relation count.
      * Otherwise, count on a sample of the table using TABLESAMPLE.
    
    The size of the sample is chosen in a way that we always roughly scan
    the same amount of rows (see TABLESAMPLE_ROW_TARGET).
    6df99924ac6c