Re: Select max(foo) and select count(*) optimization
CoL <col@mportal.hu>
From: CoL <col@mportal.hu>
To: pgsql-performance@postgresql.org
Date: 2004-01-06T11:51:13Z
Lists: pgsql-performance
Hi, Shridhar Daithankar wrote: > > select relpages,reltuples from pg_class where relname=<tablename>; > > Assuming the stats are recent enough, it would be much faster and accurate.. this needs an analyze <tablename>; before select from pg_class, cause only after analyze will update pg the pg_class C.