Karel Zak - Zakkr writes:
> I still not sure with PREPARE/EXECUTE keywords, I vote for:
>
> CREATE PLAN name AS query [ USING type, ... ]
> EXECUTE PLAN name [ USING values, ... ]
> DROP PLAN name
>
> Comments? (Please. I really not SQL's standard guru...)
SQL seems to have something like the following. (Note: The section on
dynamic SQL is mostly incomprehensible to me.)
PREPARE name AS query
DESCRIBE INPUT name [ USING x, ... ]
DESCRIBE [OUTPUT] name [ USING x, ... ]
EXECUTE name [ INTO x, y, ... ] [ USING a, b, ... ]
DEALLOCATE PREPARE name
I'm not sure if these match exactly what you're doing, but if it is at all
possible to match what you're doing to these, I'd say it would be a shame
not to do it. You've got time.
Meanwhile I'm wondering whether it would not be possible to provide the
plan caching functionality even if all you do is send the same SELECT
twice in a row. Might be tricky, of course.
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden