News for hackers. Stuff that matters.
Re:PostgreSQL Scalability: Towards Millions TPS by takeda on Tuesday May 10, 2016 @01:55PM (#11669152)
Try:

    SELECT COUNT(*) FROM (SELECT DISTINCT x FROM table) AS temp;

The

    SELECT COUNT(DISTINCT x))
Is slow because it performs sort.

There are no comments on this comment yet.