Thanks for the feedback, everybody. I spent a couple of days trying to optimise this; As mentioned , the increased memory is not an option for me, as this query is part of a report that can be run by any user on an ad hoc basis. Allocating the required memory to any session on demand is not feasible in this environment. In the end , it seems to me that a more sustainable solution will be to introduce an additional table to carry the summarized values and lookup on that table in this type of scenario. Regards -- View this message in context: http://postgresql.1045698.n5.nabble.com/Performance-issue-index-not-used-on-GROUP-BY-tp5816702p5817622.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance