David Lee
2005-Dec-23 02:15 UTC
no need for DB reflection when using config.active_record.schema_format = :ruby ?
Hi. I''ve not seen anything on this so thought I''d put forward the idea and see if it has any merit, or is already in practice. When using migrations with config.active_record.schema_format = :ruby (ruby as the canonical DB definition) it seems there would be no need to query the database itself to determine its structure; it would already be known. This might have some good implications for database performance, reducing the number of queries which need to be executed. Has this been considered, or is it worth consideration? -- cheers, David Lee
Rick Olson
2005-Dec-23 02:23 UTC
Re: no need for DB reflection when using config.active_record.schema_format = :ruby ?
On 12/22/05, David Lee <deathtoallfanatics-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi. > > I''ve not seen anything on this so thought I''d put forward the idea and > see if it has any merit, or is already in practice. > > When using migrations with config.active_record.schema_format = :ruby > (ruby as the canonical DB definition) it seems there would be no need > to query the database itself to determine its structure; it would > already be known. > > This might have some good implications for database performance, > reducing the number of queries which need to be executed. Has this > been considered, or is it worth consideration?It''s not really worth it because in production mode it''s only queried once anyway. -- rick http://techno-weenie.net
David Lee
2005-Dec-23 06:41 UTC
Re: no need for DB reflection when using config.active_record.schema_format = :ruby ?
thanks Rick. suspected as much cheers D On 12/23/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12/22/05, David Lee <deathtoallfanatics-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi. > > > > I''ve not seen anything on this so thought I''d put forward the idea and > > see if it has any merit, or is already in practice. > > > > When using migrations with config.active_record.schema_format = :ruby > > (ruby as the canonical DB definition) it seems there would be no need > > to query the database itself to determine its structure; it would > > already be known. > > > > This might have some good implications for database performance, > > reducing the number of queries which need to be executed. Has this > > been considered, or is it worth consideration? > > It''s not really worth it because in production mode it''s only queried > once anyway. > > -- > rick > http://techno-weenie.net > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- cheers, David Lee