Ð ÐÑÐ, 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 <[EMAIL PROTECTED]>
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match