Reid Thompson <Reid.Thompson@ateb.com> wrote:
> What am I missing that causes this to resort to sorting on disk?
>
> obc=# select version();
> version
> ----------------------------------------------------------------------------------------------------------
> PostgreSQL 8.3.7 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
> (1 row)
>
> Time: 43.920 ms
>
> >
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > Limit (cost=1063641.92..1063643.47 rows=20 width=13) (actual time=422710.147..422711.328 rows=20 loops=1)
> > -> Unique (cost=1063641.92..1064133.33 rows=6320 width=13) (actual time=422710.022..422711.127 rows=20
loops=1)
> > -> Sort (cost=1063641.92..1063887.62 rows=98282 width=13) (actual time=422710.014..422710.696 rows=172
loops=1)
> > Sort Key: cpn.value
> > Sort Method: external merge Disk: 304008kB
Bad estimation: rows=98282, actual rows=172
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°