3 ms·
The cost can be calculated, but not always. Example 1: SELECT ... FROM table WHERE key BETWEEN c1 AND c2 - here we can get the number of records and bytes
by zX41ZdbW 4y ago
The cost can be calculated, but not always.
Example 1:
SELECT ... FROM table WHERE key BETWEEN c1 AND c2
- here we can get the number of records and bytes to scan before even starting the query.
Example 2:
SELECT ... FROM table WHERE key = (SELECT ...)
- here we cannot know how many records will be scanned until we will finish the subquery.
Maybe some estimations can be applied... but we don't do that.