Oracle: Difference in execution plans between databases

Posted by Will on Stack Overflow See other posts from Stack Overflow or by Will
Published on 2010-04-21T17:04:39Z Indexed on 2010/04/21 17:53 UTC
Read the original article Hit count: 94

Hello,

I am comparing queries my development and production database.

They are both Oracle 9i, but almost every single query has a completely different execution plan depending on the database.

All tables/indexes are the same, but the dev database has about 1/10th the rows for each table.

On production, the query execution plan it picks for most queries is different from development, and the cost is somtimes 1000x higher. Queries on production also seem to be not using the correct indexes for queries in some cases (full table access).

I have ran dbms_utility.analyze schema on both databases recently as well in the hopes the CBO would figure something out.

Is there some other underlying oracle configuration that could be causing this?

I am a developer mostly so this kind of DBA analysis is fairly confusing at first..

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about 9i