On Aug 4, 2008, at 1:16 PM, Daniel Fischer wrote:

But seriously, using postgres as an example, not doing stored routines in this way is exactly the reason why most of postgres' stored routine languages are marked "unsafe". We could avoid the entire hassle of securing an embedded interpreter with a bytecode interface.


Definitely. The added bonus is that you can use standard compiler algorithms for optimizations, dead code elimination and the like (if that's necessary at all, of course). It's also very simple to instrument bytecode to provide debugging support or tracing (including special trace backends like DTrace) for that subsystem, a huge benefit all by itself as there is no need to litter all the surrounding code with tracing stuff.

One cool thing bytecode would allow is to flag a query to be instrumented as it flows through the execution engine and get really verbose information for that query only. Shouldn't slow down the server for all other queries because the instrumentation code would just not be there for those. No extra branches in the execution code, thus no added overhead. :)

cheers,
-k
--
Kay Roepke
Software Engineer, MySQL Enterprise Tools

Sun Microsystems GmbH    Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to