Bart Grantham <bart@xxxxxxxxxxxxxx> writes: > ... it may be relevant that one node_id has 15 times as many connections: > ... but that shouldn't make a difference to the planner, should it? Of course it should (and does). > Yes, I've vacuum analyzed. What you need to do is show EXPLAIN ANALYZE output. There's not much point in complaining that the planner's estimates don't match reality when you don't present the reality to compare with. BTW, this would be more on-topic on the pgsql-performance list. > I'd like to have a query pass back an array of ints to a > function call. Something like this: > logicops2=> select * from nodes2ancestors(array[(select node_id from > nodes where node_type_id = 3)]::int[], 0); I think it's "array(select node_id from nodes where node_type_id = 3)" ... no square brackets anywhere. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings