Re: [PERFORM] PostgreSQL OR performance

2008-11-07 Thread Richard Huxton
Віталій Тимчишин wrote: > I am sorry, I've emptied atom_match table, so one part produce 0 result, but > anyway here is explain: David's right - the total estimate is horribly wrong > "Merge Join (cost=518771.07..62884559.80 rows=1386158171 width=32) (actual > time=30292.802..755751.242 rows=347

Re: [PERFORM] PostgreSQL OR performance

2008-11-07 Thread David Wilson
On Fri, Nov 7, 2008 at 4:14 AM, Віталій Тимчишин <[EMAIL PROTECTED]> wrote: > "Merge Join (cost=518771.07..62884559.80 rows=1386158171 width=32) (actual > time=30292.802..755751.242 rows=34749 loops=1)" Have you tried increasing the default_statistics_target? The planner is expecting 1.3 billion

Re: [PERFORM] PostgreSQL OR performance

2008-11-07 Thread Віталій Тимчишин
> > > Yes, the query should output exactly same result as in "Union" plan. I will > run "slow" explain analyze now and will repost after it will complete > (tomorrow?). > BTW: I'd say planner should think rows estimated as sum of "ORs" estimation > minus intersection, but no more then sum or ORs (i