Subject RE: [IB-Architect] Select procedures
Author Jim Starkey
At 11:40 AM 6/8/00 -0400, Leyne, Sean wrote:
>Jim,
>
>Select Procedures as Views, an interesting thought!
>
>I thought that with views (as currently implemented), any criteria/order
>specified with a view (SELECT ... FROM ViewA WHERE ViewColumn1 =
>'Anything" ORDER BY ViewColumnB) was "merged" with the View definition
>to, in effect, become a single SELECT statement and hereby taking
>advantage of index and other performance optimizations.
>
>How would this the new Programmed View be integrated into this
>mechanism?
>

You are correct about the current view implementation. Views
are symbolically merged with the invocating statement during
semantic analysis and are long gone between the optimizer comes
out of his cave. But extending the mechanism to handle non-expanding
views wouldn't be that difficult, particularly if done during
a much needed optimizer cleanup. The gist of both the optimimizer
and executing structure is a tree of polymorphic record stream
blocks (RSBs), so the extension could be handled cleanly.

None of this is to say that the either the design or implementation
would be trivial or should be undertaken lightly. But it could be
done in a nice, squeeky clean way.

Jim Starkey