Random Thoughts from Castaway

Archived: 2006 / 05 / 06 / mst on perl ORMs
06 May

mst on perl ORMs

written by Castaway

Just extracting this from the IRC log for some sort of posterity.. (Maybe it should go on the cat or dbic wiki?)

May 5th, 2006:
06:17 <@mst> basically, your three perl ORMs of interest these days are
06:17 <@mst> Tangram - OODB
06:17 <@mst> Rose::DB::Object - optimised row-oriented
06:17 <@mst> DBIx::Class - resultset oriented and focused on extensiblity
06:18 <@mst> RDBO gets to be faster by aggressive code inlining. I'll take a slight performance hit in perl-land in return for not having 1000+ line subs :)
06:18 <@mst> and it doesn't have resultset objects, or GROUP BY and HAVING support
06:18 <@mst> which is a right pain for complex queries

See also this: DBIC and RDBO compared

Avatar On May 06 2006 at 17:13
John wrote:

RDBO's speed comes from more than just aggressive inlining (although it certainly does a lot of that :) RDBO uses extensive caching of "derived metadata" (e.g., commonly used SQL query strings, column lists, etc.). RDBO also goes to great lengths to only use the "fast path" in DBI, such as always using bind_col() and fetch() to retrieve data instead of fetchrow_array(), unbound calls to fetchrow_arrayref(), or fetchrow_hashref(). RDBO also "compiles down" accessor and mutator methods, both with and without triggers, to an optimized form in order to shorten the code path. Basically, any work that can be done "up-front" (or at least "infrequently") is done in order to keep the frequently used runtime code path very tight.

Your captcha is:






Only the comment itself is required, but if you supply your email we'll gladly load your gravatar. We won't use your email for any other purpose or sell it to nigerian business men. Promise.
A live preview of your comment will appear in this box.