Re: Seems like there is an issue with reltuples showing twice the number of rows

2018-04-03 Thread Ranjith Ramachandra
List, OP here. Thank you for replying. Confirms my diagnosis that it might have to do with analyze vaccum. Some debug info. 1. Loaded a CSV to fill the table with data. 2. performed analyse vacuum on this table after uploading. 3. I do not see any reason for dead rows because I have not updated

Re: Seems like there is an issue with reltuples showing twice the number of rows

2018-04-03 Thread Tom Lane
Tomas Vondra writes: > On 04/03/2018 11:14 AM, Ranjith Ramachandra wrote: >> it returns >>  reltuples  | n_live_tup | n_dead_tup >> -++ >> 2.7209e+06 |    1360448 |    1360448 >> >> If I run analyze main_csv_0f247511f5c247c8813ba3cec90c6ae1_yf34fbb38d >> and I

Re: Seems like there is an issue with reltuples showing twice the number of rows

2018-04-03 Thread Tomas Vondra
On 04/03/2018 11:14 AM, Ranjith Ramachandra wrote: > I am relying on reltuples on my web app to get fast row counts. > > This was recommended by this article to get fast approx row > counts: https://wiki.postgresql.org/wiki/Count_estimate > > > However for some table I am getting twice as many v