Re: [PERFORM] index not used when using function

2004-10-03 Thread Pierre-Frédéric Caillaud
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:

[PERFORM] index not used when using function

2004-09-29 Thread Shiar
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