Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> rt2=# SELECT name from users group by name having count(*) > 1 limit 20;
> (4 rows)
> rt2=# SELECT name from users group by name having count(*) > 1 ;
> (0 rows)
Weird. What PG version is this? What does EXPLAIN show for each of
these queries (maybe EXPLAIN ANALYZE too)? Can you provide a
self-contained test case?
regards, tom lane