Hi all, I came accross the following problem lately: I got a table with several BLOB fields (Oracle DB) and I have ActiveRecord reading those fields whenever records are loaded using finder methods. This behavior is just fine in 99.9% of the time, but considering BLOB data is not small, it is considerably slowing down search access :(. So basically, I thought about building a :has_one relationship and add an extra table table holding BLOB value so as to cope with the pb. I found it painfull and not very 'RoRy', so I decided to hack ActiveRecord::Base so as to delay the attribute load... and it works ! Attributes are dynamicaly loaded whenever client application accesses them explicitely. Syntax looks like the following: class A < ActiveRecord::Base delay_attributes :foo, :bar ... end Now I got two questions: - as I am new Rails (and Ruby as well): I am wondering if I am missing something concerning ActiveRecord usage (meaning this hack is useless), - if this patch is a good idea, I'd like to submit it to the maintainers of the project, but I don't know what is the exact procedure to do so. Thx
on 2006-04-01 12:34
on 2006-04-01 13:39
This post is probably more suitable for the main rails list. - james On 4/1/06, Laurent Lecigne <llecigne@free.fr> wrote: > found it painfull and not very 'RoRy', so I decided to hack > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > engine-developers mailing list > engine-developers@lists.rails-engines.org > http://lists.rails-engines.org/listinfo.cgi/engine... > -- * J * ~
on 2006-04-02 12:20
Done. Thx James Adam wrote: > This post is probably more suitable for the main rails list. > > - james > > On 4/1/06, Laurent Lecigne <llecigne@free.fr> wrote: >> found it painfull and not very 'RoRy', so I decided to hack >> >> >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> engine-developers mailing list >> engine-developers@lists.rails-engines.org >> http://lists.rails-engines.org/listinfo.cgi/engine... >> > > > -- > * J * > ~
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.