Search Postgresql Archives

Indices for select count(*)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, thank you for your answer.

Regarding the performance flow when trying to find out how many records are currently being stored in the table, I don't see how an index should help... Nevertheless we've created an unique index on "ID" but SELECT count("ID") from "XYZ" still takes 35 seconds*. (ID is the primary key basing on a sequence, select count(*) isn't faster.)

So - what kind of indexing would speed this up then?

Thanx in advance!

Alexander.

*) MSSQL 2005 on the same server takes 4 seconds for this query for the analogue table, and there hasn't any special tuning been applied, too.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux