En un mensaje anterior, Tom Lane escribió:
> Well, it's sure confused about the selectivity of WHERE activa,
> all right.
>
> I tried to duplicate this here, by duplicating the table definition you
> sent and filling it with some junk data --- about 1800 rows, 1500 of
> which had activa = 't'. I found that after loading the table and
> running a plain "vacuum", the system indeed estimated one row out, just
> as you show above. But after "vacuum analyze", it estimated 1360 rows
> out, which is a lot closer to reality (and would make a big difference
> in the plan selected for a join).
>
> Now I know you said you did a "vacuum analyze" on the table, but
> I am wondering if maybe you got confused about what you did.
> Please try it again just to make sure.
I tried again and now it's working better. I think the first problem
was due to low shared memory available and a special factor between my
keyboard and my chair ;-)
Thanks for all you help!
Fernando P. Schapachnik
Administración de la red
VIA Net Works Argentina SA
Diagonal Roque Sáenz Peña 971, 4º y 5º piso.
1035 - Capital Federal, Argentina.
(54-11) 4323-3333
http://www.via-net-works.net.ar