horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Avoid IO in query plan stage

Open jiacai2050 opened this issue 3 years ago • 0 comments

Describe this problem

In current implementation, when we create a ExecutionPlan for ScanTable, it will begin to scan table, this is problematic since in build plan stage, NO IO should happen, all operations should be light-weighted.

Some issue I can think of:

  1. Incorrect metrics stats of ExecutionPlan
  2. explain statement will take longer time to execute.

Steps to reproduce

No need

Expected behavior

No response

Additional Information

https://github.com/CeresDB/ceresdb/blob/c54a4cbf1db5f9f18435f5d419fa638d57749af3/table_engine/src/provider.rs#L214

We need to move maybe_init_stream inside ScanTable::execute

jiacai2050 avatar Dec 29 '22 09:12 jiacai2050