Skip site navigation (1) Skip section navigation (2)

Re: rows in explain

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Lee Wu <Lwu(at)mxlogic(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: rows in explain
Date: 2005-07-29 18:45:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
On Fri, Jul 29, 2005 at 11:54:18AM -0600, Lee Wu wrote:
> explain select count(*) from pg_class where relname='pg_class';
>                           QUERY PLAN
> --------------------------------------------------------------
>  Aggregate  (cost=4.55..4.55 rows=1 width=0)
>    ->  Seq Scan on pg_class  (cost=0.00..4.55 rows=1 width=0)
>          Filter: (relname = 'pg_class'::name)
> (3 rows)
> Where and how PG get "rows=1"?

The planner uses statistics to estimate the number of rows that a
query will return.  Here are a couple of links that provide more

Michael Fuhr

In response to

pgsql-admin by date

Next:From: Lee WuDate: 2005-07-29 20:48:51
Subject: Re: rows in explain
Previous:From: Lee WuDate: 2005-07-29 17:54:18
Subject: rows in explain

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group