4 ms·
Only one data point, but I've got a custom search engine for a community that has pretty close to the ideal usage pattern for this: append-only with no update o
by nieve 8y ago
Only one data point, but I've got a custom search engine for a community that has pretty close to the ideal usage pattern for this: append-only with no update or deletes. A pure count(*) over 6.8M rows on a slow VPS takes 135,015ms and the n_live_tup technique¹ takes 214ms. The latter was 00.009557% high before an analyze and 00.001414% low afterward. Definitely good enough for me.
¹ SELECT n_live_tup FROM pg_stat_all_tables WHERE relname = 'comments';