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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq