Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
The syntax is
<table factor> ::= <table primary> [ <sample clause> ]
|
<sample clause> ::= TABLESAMPLE <sample method> <left paren> <sample percentage> <right paren>
|
<sample method> ::= BERNOULLI | SYSTEM
|
<sample percentage> ::= <numeric value expression>
|
The goal is
- support BERNOULLI
- internally it'll just be a full rnd_next() table scan
- support SYSTEM
- this will either fall back to Bernoulli if the percentage is too high
- or use a new interface, say, handler::ha_get_random_row() which will use a random dive into a b-tre, which in MyISAM/Aria will use a "reverse records_in_range" approach. Which is skewed, but so is records_in_range(). Fixing both is beyond the scope of this task.
Implementation order
- syntax, only with SYSTEM
- handler interface and storage engine implementation for random dives
- Bernoulli
Attachments
Issue Links
- blocks
-
MDEV-24092 support oracle syntax: sample
-
- Open
-