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

From Tom Lane
Subject Re: How to read a query plan?
Date
Msg-id 9761.987606941@sss.pgh.pa.us
Whole thread Raw
In response to How to read a query plan?  (elwood@agouros.de (Konstantinos Agouros))
List pgsql-general
elwood@agouros.de (Konstantinos Agouros) writes:
> after this I created an index on the field webhost, now the query plan says:

CREATE INDEX updates the basic statistics about the table's size (number
of rows and disk blocks).  The first plan was evidently generated using
statistics that claimed the table was empty.  The second plan has rather
more plausible-looking numbers.  I surmise that you did something like

    CREATE TABLE ...

    VACUUM   (sets stats to reflect empty table)

    load a bunch of data

    EXPLAIN

    CREATE INDEX  (now stats reflect existence of data)

    EXPLAIN

> Could someone give me an interpretation (or a URL that explains this)?

See the performance section of the User's Guide for a general discussion
of EXPLAIN.

            regards, tom lane

pgsql-general by date:

Previous
From: martin.chantler@convergys.com
Date:
Subject: Re: Yet another Performance Question
Next
From: Peter Eisentraut
Date:
Subject: Re: How to read a query plan?