Thanks very much Laurenz. I'll put your suggestions into motion right away and let you know the results. Albe Laurenz *EXTERN* wrote > BTW, you seem to have an awful lot of indexes defined, some > of which seem redundant. I am in the process of pruning unused/useless indexes on this database - So many of them will be dropped. Most of them are not in production and are past play things on this test system. The actual production test_item table gets about 140k inserts a day (avg). Having this test system slow, dirty and bloated is quite good as it helps us identify potential bottlenecks before they hit production. Partitioning is also on the cards, but solving this current issue is only going to help. Thanks again. Andy -- View this message in context: http://postgresql.1045698.n5.nabble.com/Slow-query-where-am-I-going-wrong-tp5730015p5730025.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