Nathan Bell <nathanb@xxxxxxxxxx> writes: > What if the item that is taking a long time isn't a function, but rather > a sub-select? The point is that the view won't be flattened if there are nonvolatile functions in its SELECT list. regards, tom lane