Re: How to read a query plan? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: How to read a query plan?
Date
Msg-id Pine.LNX.4.30.0104181731200.762-100000@peter.localdomain
Whole thread Raw
In response to How to read a query plan?  (elwood@agouros.de (Konstantinos Agouros))
Responses Re: How to read a query plan?
List pgsql-general
Konstantinos Agouros writes:

> logs=> explain select distinct on (url) url, category, action from websenseflat where webhost='dir.yahoo.com' and
datum>='1-26-2001' and datum < '1-27-2001'; 
> NOTICE:  QUERY PLAN:
>
> Unique  (cost=0.01..0.01 rows=1 width=36)
>   ->  Sort  (cost=0.01..0.01 rows=1 width=36)
>         ->  Seq Scan on websenseflat  (cost=0.00..0.00 rows=1 width=36)
>
> EXPLAIN
>
> after this I created an index on the field webhost, now the query plan says:
>
> NOTICE:  QUERY PLAN:
>
> Unique  (cost=19690.08..19690.22 rows=5 width=36)
>   ->  Sort  (cost=19690.08..19690.08 rows=53 width=36)
>         ->  Index Scan using wsflwebhost on websenseflat  (cost=0.00..19688.55 rows=53 width=36)
>
> EXPLAIN
>
> Could someone give me an interpretation (or a URL that explains this)?

http://www.de.postgresql.org/devel-corner/docs/postgres/performance-tips.html

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to read a query plan?
Next
From: Steve Wampler
Date:
Subject: 7.1 bug fix question