Brian Modra wrote:
> I had a similar problem: I did a large delete, and then a selct which
> "covered" the previous rows.
> It took ages, because the index still had those deleted rows.
> Possibly the same happens with update.
>
> Try this:
> vacuum analyse
> reindex database ....
> (your database name instead of ...)
>
> or, rather do this table by table:
> vacuum analyse ....
> reindex table ...
>
>
> Autovacuum is a generally good thing.
>
>> So, my main question is.. how can just a plain simple restart of postgres
>> restore the original performance (3% cpu time)?
>
> there were probably some long transactions running. Stopping postgres
> effectively kills them off.
I'll try that, thanks for your help Brian.