-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Adam wrote:
> On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote:
> 
>> > That said, I think providing an 'import' method as a plugin would
>> > certainly be useful to some people (especially those too lazy to
>> > connect to a database by hand).
>>
>> I like to automate tasks, if that makes me lazy, then I am lazy.
> 
> 
> Me too - I must confess to having an AR model in one of my projects
> for the explicit purpose of connecting to a DB, and nothing else.
> Necessity is the mother of innovation; Lazyness is the mother of
> pragmatism. I certainly have no issue taking Models out to dinner,
> plying them with rich foods and cheap wines, and then swiping their
> underlying DB connection using instance_eval before they know what's
> happened to them. Don't hate the player baby, hate the game! Ahem.

I don't have a PhD, don't worry. ;)


>> > Another thing to do might be reworking
>> > it to use prepared statements, for an even bigger speed increase.
>>
>> I like the idea of keeping logic outside of the DB itself.
> 
> 
> Perhaps we're talking at cross purposes, but I don't think using a
> prepared statement is pushing logic into the DB; rather it's taking
> advantage of cache features so the DB can be a bit smarter (or in some
> cases a LOT smarter) about how it handles your request. At the
> ActiveRecord API level, whether you're using a prepared statement or
> not should be transparent; your import(array) method needn't change
> the argument it accepts or the result it returns. It might be worth
> investigating in this context, since you essentially on a quest for
> speed and efficiency.

I'll look into this more, thanks for clarifying.

> Finally, implementing this as a plugin first will give people
> (including the core team I'd imagine) the opportunity to evaluate this
> addition in 'production' environments, which is an excellent way to
> highlight its value. Don't think of doing as a plugin as a
> 'second-best' solution...

Plugin is the way I started, and plugin is the way I will continue to go for 
the time being. Before I got to far with bringing
implementations I wanted to pose this question and have this very discussion to 
determine where my effort should be applied
(patches to AR trunk or at a plugin).

Thanks for the discussion and your viewpoints. It is very appreciated as I move 
towards a faster AR. ;)

Zach


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEvAh/Myx0fW1d8G0RAoakAJ4hSElM8Y0nFQ7JDlqztUIkY6BohQCeM5yr
NYaK040952E7YqM+Ovqt7Tc=
=uQ/0
-----END PGP SIGNATURE-----
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to