def fetch_rows
    state[:chunksize] = fetch_chunksize
    ds = table.order(*order_by).limit(state[:chunksize], state[:offset])
    log.debug "DataStream#fetch_rows SQL -> #{ds.sql}"
    rows = Taps::Utils.format_data(ds.all,
      :string_columns => string_columns,
      :schema => db.schema(table_name),
      :table  => table_name
    )
    update_chunksize_stats
    rows
  end
def fetch_rows
    state[:chunksize] = fetch_chunksize
    ds = table.order(*order_by).limit(state[:chunksize], state[:offset])
    log.debug "DataStream#fetch_rows SQL -> #{ds.sql}"
    rows = Taps::Utils.format_data(ds.all,
      :string_columns => string_columns,
      :schema => db.schema(table_name),
      :table  => table_name
    )
    update_chunksize_stats
    rows
  end
keep a record of the average chunksize within the first few hundred thousand records, after chunksize
 goes below 100 or maybe if offset is > 1000