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! )
posted 14 years ago
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 .
Everybody's invited. Even this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database