Re: select count(*); - Mailing list pgsql-general

From Geoff Winkless
Subject Re: select count(*);
Date
Msg-id CAEzk6fdowS0_6ntvrwEWu_KVKRL+qGiOdavvrbU18FeL0q_TmQ@mail.gmail.com
Whole thread Raw
In response to Re: select count(*);  (Marc Mamin <M.Mamin@intershop.de>)
Responses Re: select count(*);  (Marc Mamin <M.Mamin@intershop.de>)
List pgsql-general
On 11 June 2015 at 15:05, Marc Mamin <M.Mamin@intershop.de> wrote:
That's the point. * has no meaning without FROM

But COUNT(*)
​​
does
have meaning - it means "the number of rows".
​ It's not counting the number of columns in the row, so postgres doesn't need to know what columns exist in the row to return a row count.​

​Geoff​

pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Planner cost adjustments
Next
From: Marc Mamin
Date:
Subject: Re: select count(*);