a,b from table where c=1 and d= 2;.
1. How does the optimizer decides if it wants do full table scan or index scan.
2. If "d" in above query is index. How does the predicate comparison works with table data.
1 based on IO prediction and statistics on the table 2) question is unclear.
If at least one of the columns is indexed, it will result in an index scan. However, for the other unindexed columns, it has to scan the rows and do the filtering further
Обсуждают сегодня