From: | Andreas Kretschmer <akretschmer(at)spamfence(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: seq-scan or index-scan |
Date: | 2012-07-05 06:16:00 |
Message-ID: | 20120705061600.GA7818@tux |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andreas Kretschmer <akretschmer(at)spamfence(dot)net> writes:
> > production=*# explain analyse select * from boxes;
> > QUERY PLAN
> > ---------------------------------------------------------------------------------------------------------------
> > Seq Scan on boxes (cost=0.00..990783.99 rows=6499 width=581) (actual time=6.514..4588.136 rows=3060 loops=1)
> > Total runtime: 4588.729 ms
> > (2 rows)
>
> That cost estimate seems pretty dang large for a table with only 6500
> rows. I suspect this table is horribly bloated, and the indexscan
> manages to win because it's not visiting pages that contain only dead
You're right as always ;-)
A LOT of updates and dead rows and the table is bloated.
(some rows contains more than 1MByte of TEXT and some rows updated once
per second or so)
> rows. Try VACUUM FULL, and if that makes things saner, re-examine
> your autovacuum settings.
I can't run a VACUUM FULL because of the workload, but i have decrease
the fillfactor.
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Schwarzer | 2012-07-05 06:20:12 | Re: ERROR: function crosstab(unknown, unknown) does not exist |
Previous Message | Tatsuo Ishii | 2012-07-05 06:15:46 | Re: question about source download site. |