AW: Different Query plan when run on different server
Posted in 2006
>Colin Dawson wrote
> This server has a
> restored copy of
> the live DB albeit one week old.
If it is a copy of PRD and configuration (look at OPTCOMPIND!) and
environment
(PDQPRIORITY !) is the same it should produce the same query plan.
>
> BTW Running dostats on the table (124M rows) took almost 6
> hours on live yet
> on the test server it took 3hrs 25mins. The only differences
> with Informix
> on the two servers is one is active 24*7 and the onconfig
> parameters to
> reduce the size of SHM and locks etc.
When you ran update statistics for the table in question, the query plan
may change
of course. However, to analyse the plan you would need to have a look at
the
distributions (dbschema -d <db> -hd <table>) and statistics (index
levels and
leaves etc.)
The time it takes to run update staistics depends.
- How many rows
- For how many columns you run med or high
- Are these columns indexed?
- How many inderxes are on the table ?
- of course load on the system