Re: psql large RSS (1.6GB)

Markus Bertheau <twanger@bluetwanger.de>

From: Markus Bertheau <twanger@bluetwanger.de>
To: TTK Ciar <ttk2@hardpoint.ciar.org>
Cc: pgsql-performance@postgresql.org
Date: 2004-10-31T10:27:01Z
Lists: pgsql-performance
В Срд, 27.10.2004, в 09:57, TTK Ciar пишет:

> brad=# explain analyse select ServerDisks.servername,ServerDisks.diskserial,ServerDisks.diskmountpoint,DiskFiles.name,DiskFiles.md5 from DiskFiles,ServerDisks where DiskFiles.diskserial=ServerDisks.diskserial;
>                           QUERY PLAN                                                         
> ------------------------------------------------------------------
>  Hash Join  (cost=22.50..65.00 rows=1000 width=274) (actual time=118.584..124653.729 rows=10133349 loops=1)
>    Hash Cond: (("outer".diskserial)::text = ("inner".diskserial)::text)
>    ->  Seq Scan on diskfiles  (cost=0.00..20.00 rows=1000 width=198) (actual time=7.201..31336.063 rows=10133349 loops=1)
>    ->  Hash  (cost=20.00..20.00 rows=1000 width=158) (actual time=90.821..90.821 rows=0 loops=1)
>          ->  Seq Scan on serverdisks  (cost=0.00..20.00 rows=1000 width=158) (actual time=9.985..87.364 rows=2280 loops=1)
>  Total runtime: 130944.586 ms

You should run ANALYZE on your database once in a while.

-- 
Markus Bertheau <twanger@bluetwanger.de>