| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Lisa Guo <lguo(at)fb(dot)com> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: n_live_tup smaller than the number of rows in a table |
| Date: | 2015-01-17 00:23:20 |
| Message-ID: | 29722.1421454200@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Lisa Guo <lguo(at)fb(dot)com> writes:
> We are seeing a strange behavior where n_live_tup is way smaller than the number of rows in a table. The table has > 18m rows, but n_live_tup only has < 100K. We tried to do vacuum analyze to clear up any sticky errors, but it didnt correct the problem. We are running Postgres 9.2. Any pointers on how we could debug this problem and how to correct the stats?
n_live_tup is a moving average over the last few observations, so in
theory it should get better if you repeat ANALYZE several times.
AFAIR, VACUUM isn't likely to help much. (VACUUM FREEZE might though.)
It seems odd that you have a value that's so far off ... have you been
using this table in any unusual way?
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lisa Guo | 2015-01-17 00:39:00 | Re: n_live_tup smaller than the number of rows in a table |
| Previous Message | Peter Geoghegan | 2015-01-17 00:10:27 | Re: hung backends stuck in spinlock heavy endless loop |