Re: [PERFORM] Query performance

2015-01-25 Thread Marc Mamin
>I have an events table that records page views and purchases (type = 'viewed' >or type='purchased'). I have a query that figures out "people who >bought/viewed this also bought/viewed that". > >It worked fine, taking about 0.1 seconds to complete, until a few hours ago >when it started taking

Re: [PERFORM] Query performance

2015-01-25 Thread Tomas Vondra
Hi, On 25.1.2015 07:38, Joe Van Dyk wrote: > > Here's one that's not quite as well: http://explain.depesz.com/s/SgT As Pavel already pointed out, the first problem is this part of the plan: Seq Scan on events e2 (cost=0.00..120,179.60 rows=4,450,241 width=51) (actual time=0.014..33,773.370 rows

Re: [PERFORM] Query performance

2015-01-25 Thread Pavel Stehule
2015-01-25 8:20 GMT+01:00 Joe Van Dyk : > On Sat, Jan 24, 2015 at 11:14 PM, Pavel Stehule > wrote: > >> >> >> 2015-01-25 7:38 GMT+01:00 Joe Van Dyk : >> >>> >>> >>> On Sat, Jan 24, 2015 at 10:12 PM, Pavel Stehule >> > wrote: >>> Hi this plan looks well Regards P