Description:
The virtual handler::read_time() is used (together with ::scan_time()) by the cost optimizer to select the best access pattern for a table.
::read_time() has not been implemented by ha_ndbcluster - Therefore a comparison with cost estimates returned by ha_ndbcluster::scan_time() does not make sense.
When implementing ::read_time(), keep in mind:
- The 'cost' estimate returned from ::read_time() should be
comparable with thoose returned from ::scan_time().
- The optimizer also calculates its own 'cost' for primary/unique
key lookup with cost= 1 for each lookup.
- The metric for the cost estimates seems to be #disk seeks assumed
to be required to read / scan the rows. This does not make sense
for Cluster, but a fairly good metric for Cluster could be #RPC
calls required for the operation.
NOTE:
::scan_time() currently returns a cost which is (#rows x 1000).
This is far out related to the discussion above and should be adjusted
together with implementing ::read_time()
How to repeat:
N/A - read the code!
Suggested fix:
Implement ::read_time() and adjust the cost returned from ::scan_time() wrt. the cost estimated by ::read_time()
Page generated in 0.046 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.