PreparedStatement re-parses such queries during each invocation.
And we also have another known problem with CTEs: temporary views from
different statements may conflict with each other. Such views should not be
visible outside of the command.
--
You received this message because you are
Its unfortunate that we are creating and destroying local temp tables for
each query - since we're using a PreparedStatement, they should ideally be
cached and only dropped when the connection is closed.
But I remember trying to improve our CTE architecture and not having much
luck. The lifecycle