Re: Questions regarding indexes - Mailing list pgsql-general

From Tom Lane
Subject Re: Questions regarding indexes
Date
Msg-id 11281.1232137415@sss.pgh.pa.us
Whole thread Raw
In response to Re: Questions regarding indexes  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-general
"Scott Marlowe" <scott.marlowe@gmail.com> writes:
> The order doesn't matter.  Analyze doesn't know anything about the
> indexes, it knows about the fields / tables.  I.e. if you run analyze,
> then create the index, you get the same basic result as if you create
> the index then run analyze.

There is an exception to that statement, which is indexes on functions
(expressions).  Existence of such an index prompts analyze to gather
stats about the indexed expression.  For plain column indexes, you're
right, it doesn't matter.

            regards, tom lane

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Query sometimes takes down server
Next
From: Jason Long
Date:
Subject: Re: Query sometimes takes down server