laser wrote: > SELECT url,sum(ct) as ctperkw from ctrraw group by url order by ctperkw > desc limit 1000; > and the query run out of memory, the log file attached. Have you run ANALYZE recently? You might be running into the well-known problem that hashed aggregation can consume an arbitrary amount of memory -- posting the EXPLAIN for the query would confirm that. -Neil ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend