[PERFORM] Slow joins against set-returning functions

2004-08-15 Thread Michael Fuhr
PostgreSQL versions: 7.4.3, 8.0.0beta1 Joins against set-returning functions can be slow. Here's a simple example (in 8.0.0beta1, the gen_series function can be replaced with generate_series): CREATE FUNCTION gen_series(INTEGER, INTEGER) RETURNS SETOF INTEGER AS ' DECLARE xstart

Re: [PERFORM] Slow joins against set-returning functions

2004-08-15 Thread Tom Lane
Michael Fuhr [EMAIL PROTECTED] writes: Is the planner doing something wrong here? Hard to see how it can be very smart with no idea about what the function is going to return :-(. I'd say that the mergejoin plan is actually a good choice given the limited amount of info, because it has the