My query spans three databases on one Sql Server 2000 instance. Is the query execution plan optimized as it would be when the tables are all in the same database? I expect the optimizer considers all the statistics the same, whether they are in the same database or in different databases if it is on the same instance. Of course the optimizer can't make use of constraints between tables in different databases, because one can't define constraints between tables in different databases. Cor Westra, Expansion
Yes, optimizer make use of the statistics when it generates the query plan even the table is from different db.