>Since that's on the outside of a nestloop, the 169x rowcount error
>translates directly to a 169x error in the total runtime estimate ---
>and it looks like that's not very far at all from the real ratio,
>so the other estimates are pretty good.
You're correct - the query's exercising a very small subset of that table.
The table has 400,000 rows, of which only 400 have Originator Type = 'NO
DATA', and ALL the rows with those two Areas have Originator Type = 'NO
DATA'. As you say, increasing the stats target may not make much difference
because of the size of this sample when compared to the overall data set (in
fact the production servers have it set to 700 and it makes little
real-world difference), so we'll go with your initial suggestion and upgrade
to 8.4. Thanks again; this has been an good set of lessons to learn.
Steve