Skip to content

Instantly share code, notes, and snippets.

@gregglind
Created August 18, 2010 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregglind/536371 to your computer and use it in GitHub Desktop.
Save gregglind/536371 to your computer and use it in GitHub Desktop.
drop table if exists a;
begin;
create table a (n int);
insert into a values (1);
analyze a;
/* it's there */
select schemaname, relname, last_vacuum, last_autovacuum, last_analyze from
pg_stat_user_tables where last_analyze is null and relname = 'a';
commit;
analyze a;
/* should be not there but is */
select schemaname, relname, last_vacuum, last_autovacuum, last_analyze from
pg_stat_user_tables where last_analyze is null and relname = 'a';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment