From: | dinesh kumar <dineshkumar02(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | AI Rumman <rummandba(at)gmail(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: when do I analyze after concurrent index creation? |
Date: | 2013-10-21 05:49:51 |
Message-ID: | CALnrH7ow=O_-JFwerWpSBHxnU6rM11xNRVdX0==Wz9J-ihHfgw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Oct 18, 2013 at 9:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> dinesh kumar <dineshkumar02(at)gmail(dot)com> writes:
> > When we create an index, i believe the postgres engine it self update
> it's
> > catalog about the index availability.
>
> ANALYZE normally collects statistics about the contents of table columns.
> Thus, adding (or removing) an index does not create any reason to
> re-ANALYZE.
>
> However ... if you have an index on an expression (not just a simple
> column value), that cues ANALYZE to collect statistics about the values of
> that expression. So re-analyzing is useful after creating such an index,
> to give the planner a better idea of when to use that index.
>
>
Thank you Tom.
> Whether you used CREATE INDEX CONCURRENTLY or some other way of creating
> the index doesn't matter at all.
>
> regards, tom lane
>
Regards,
Dinesh
manojadinesh.blogspot.com
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Tanzer | 2013-10-21 07:50:51 | pg_dump doesn't restore on newer database due to schema issues (bug or limitation?) |
Previous Message | Pavel Stehule | 2013-10-21 04:39:23 | Re: Preserving the source code of views |