|
> 小表就一定是走全表?
No. As I said in message #13, it depends on cost calculation. If you want to know why the cost is "counter-intuitive", think about the index. Remember there's a clustering factor. It's quite possible to create a test case where a small table has an index whose clustering factor is almost the same as the number of rows in the table. Test the SQL in that case and let us know.
Yong Huang |
|