Thread: Performances

Performances

From
Cedric BUSCHINI
Date:
Hello everyone,

A quick question:
- how long does it take you to perform that query :
"SELECT COUNT(*) FROM A_TABLE;"

There are like 56113000 rows in the table.

Thanks

Cedric

Re: Performances

From
Bricklen Anderson
Date:
Cedric BUSCHINI wrote:
> Hello everyone,
>
> A quick question:
> - how long does it take you to perform that query :
> "SELECT COUNT(*) FROM A_TABLE;"
>

Not long  :)

dev5=# SELECT COUNT(*) FROM A_TABLE;
ERROR:  relation "a_table" does not exist

Re: Performances

From
Alvaro Herrera
Date:
Cedric BUSCHINI wrote:
> Hello everyone,
>
> A quick question:
> - how long does it take you to perform that query :
> "SELECT COUNT(*) FROM A_TABLE;"

Longer than I want to wait in any case.  In most cases you can rewrite
that query to something else; what that something looks like, depends on
how exact you want the result to be.  So the question to you is, what do
you want that number for?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support