Re: [ADMIN] help tuning query

2009-08-20 Thread Emanuel Calvo Franco
First one, try to paste explain into http://explain.depesz.com/ > select > a.id, > ident_id, > time, > customer_name, > extract('day' from timezone(e.name, to_timestamp(a.time))) as day, > category_id > from > pwreport.url_hits a left outer join > pwreport.url_hits_category_jt c on (a.id = c.url_h

[ADMIN] help tuning query

2009-08-19 Thread Kevin Kempter
Hi all; we've been fighting this query for a few days now. we bumped up the statistict target for the a.id , c.url_hits_id and the b.id columns below to 250 and ran an analyze on the relevant tables. we killed it after 8hrs. Any suggestions? $ psql -ef expl.sql pwreport