Re: Slow performance with left outer join - Mailing list pgsql-performance

From Pavel Stehule
Subject Re: Slow performance with left outer join
Date
Msg-id 162867790801211004q3b01f0a3hb97d162392ac037@mail.gmail.com
Whole thread Raw
In response to Re: Slow performance with left outer join  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Hello

> >               Filter: ((COALESCE((at_type)::integer, 1) = 1) AND (COALESCE(at_language, 0::numeric) = 0::numeric))
>
> If this is slow, it must be that the scan of fpuarticletext actually
> returns many more rows than the single row the planner is expecting.
> The reason the estimate is off is probably that the planner cannot make
> any useful estimate about those COALESCE expressions.  Try rewriting
> them in the simpler forms
>
>         (at_type = 1 or at_type is null) AND
>         (at_language = 0 or at_language is null)
>

what about put this topic into FAQ.

Regards
Pavel Stehule

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Slow performance with left outer join
Next
From: Decibel!
Date:
Subject: Re: strange pauses