Search Postgresql Archives

Re: How to avoid "Seq Scans"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



am  Wed, dem 29.08.2007, um 11:15:21 +0200 mailte Vincenzo Romano folgendes:
> This loop is increadibly slow. Infact the friendly explain tells me
> that:
> 
> test=# explain select * from t order by f2,f3;
>                                    QUERY PLAN
> ---------------------------------------------------------------------------------
>  Sort  (cost=958786.20..970734.55 rows=4779338 width=28)
>    Sort Key: f2,f3
>    ->  Seq Scan on t  (cost=0.00..85501.38 rows=4779338 width=28)
> 
> I'd like to know a hint about a technicque to avoid the sequential 
> scan!

A 'select foo from bar' without a WHERE-condition forces a seq-scan
because _YOU_ want the whole table.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux