From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Konstantinos Agouros <elwood(at)agouros(dot)de> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to read a query plan? |
Date: | 2001-04-18 15:31:48 |
Message-ID: | Pine.LNX.4.30.0104181731200.762-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmx(dot)net http://funkturm.homeip.net/~peter
From | Date | Subject | |
---|---|---|---|
Next Message | Konstantinos Agouros | 2001-04-18 15:46:42 | Re: Yet another Performance Question |
Previous Message | Steve Wampler | 2001-04-18 15:28:19 | 7.1 bug fix question |