Doug McNaught wrote:
> It's not the VACUUM that's necessary; it's the ANALYZE. The query
> planner uses table statistics to make its decisions, and ANALYZE is
> what collects those statistics. Without an ANALYZE the planner will
> make default assumptions that are rarely correct. :)
I am not the original poster, but I am a PG newbie, so:
So - are you saying that if you have a table, and you create an index on
that table, you need to perform an ANALYZE in order for PG to use the
index. Otherwise, the index goes unused (or used improperly)?
I am just trying to understand this for a database I have set up, where
I set up a variety of indexes, assumming (wrongly?) that the indexes
would be used once they were created.
Andrew L. Ayers
Phoenix, Arizona
-- CONFIDENTIALITY NOTICE --
This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain
informationthat is privileged, confidential and exempt from disclosure under applicable law. If you are not the
intendedaddressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use,
copy,disclose or distribute to anyone the message or any information contained in the message. If you have received
thismessage in error, please immediately advise the sender by reply email, and delete the message. Thank you.