Rishavbhattarai commented on issue #68895:
URL: https://github.com/apache/doris/issues/68895#issuecomment-6335389198

   I'd like to take this one too (see my note on #68896).
   
   Proposal: in `OlapAnalysisTask.doSample()`, decide the sample algorithm 
before collecting min/max.
   - If the algorithm falls back to FULL, the analyze query already scans the 
whole table. So MIN/MAX can be computed inline in that query instead of in a 
separate `collectMinMax()` query. That gives the same result with one query 
fewer per column.
   - For a real sample (LINEAR/DUJ1), keep the exact `collectMinMax()` by 
default, and add a global session variable `enable_sample_min_max` (default 
false) that takes min/max from the sampled tablets instead. That trades range 
accuracy for far fewer reads on huge cloud tables.
   
   Does that split sound right to you, or would you rather source min/max 
differently (e.g. from rowset/segment metadata)?
   
   @englefly @morrySnow
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to