The optimiser would have to generate a new query plan for each table. One reason for this is that different tables may have different indexes so the method of accessing the data may be different. Even if the indexes, etc. were all the same on different tables, the optimised query plan only provides a template for substitution of values.
The same query using different values can be executed the same way. The same query using a different table must be executed differently (i.e. on a different table! )
Joined: Sep 28, 2002
Hi Julian, Thanks for the reply. I also had a feeling that it varies from table to table, but just wanted to confirm it. Thanks for the details .