Maybe add an order by artist to force a groupaggregate ?
Hi all, a small question:
I've got this table "songs" and an index on column artist. Since
there's about
one distinct artist for every 10 rows, it would be nice if it could use
this
index when counting artists. It doesn't however:
Hi all, a small question:
I've got this table "songs" and an index on column artist. Since there's about
one distinct artist for every 10 rows, it would be nice if it could use this
index when counting artists. It doesn't however:
lyrics=> EXPLAIN ANALYZE SELECT count(DISTINCT artist) FROM song