"Nick Fankhauser" <[EMAIL PROTECTED]> writes: >> Nick, can you find out why this row count estimation is so far off?
> It's actually correct: Sure, the 3501 was the "actual". The estimate was 1 row, which was pretty far off :-( > Here are the stats: It looks like you are running with the default statistics target (10). Try boosting it to 100 or even more for this column (see ALTER TABLE SET STATISTICS, then re-ANALYZE) and see if the estimate gets better. I think the major problem is likely here: > n_distinct | 24215 which is no doubt much too small (do you have an idea of the number of distinct actor_full_name_uppercase values?) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html