[GENERAL] Is auto-analyze as thorough as manual analyze? - Mailing list pgsql-general

From Jack Christensen
Subject [GENERAL] Is auto-analyze as thorough as manual analyze?
Date
Msg-id 5ddd2617-66b0-a6e2-3af4-618e09a96647@jackchristensen.com
Whole thread Raw
Responses Re: [GENERAL] Is auto-analyze as thorough as manual analyze?
List pgsql-general
Just had an issue where a prepared query would occasionally choose a 
very bad plan in production. The same data set in a different 
environment consistently would choose the index scan. As would be 
expected, running analyze on that table in production resolved the issue.

However, before I ran the analyze I checked pg_stat_user_tables to see 
last_autoanalyze for that table. It had run today. But the problem 
existed before that. I would have expected that the auto-analyze would 
have corrected this (or prevented it entirely if run enough).

So that leaves me wondering: is an auto-analyze the same as manually 
running analyze or is a manual analyze more thorough? This is running 
version 9.6.3 on Heroku.

Thanks,

Jack




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: [GENERAL] Is float8 a reference type?
Next
From: Melvin Davidson
Date:
Subject: Re: [GENERAL] Is auto-analyze as thorough as manual analyze?