The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From: Hongli Lai <hongli...@gmail.com>
Date: Mon, 14 May 2007 11:40:41 -0700
Local: Mon, May 14 2007 2:40 pm
Subject: Re: Request for comments: prepared statements in ActiveRecord
On May 14, 8:25 pm, "Mislav Marohnić" <mislav.maroh...@gmail.com>
wrote: > So, every query ever issued will become a prepared statement. Isn't this The current implementation immediately removes prepared statements > going to lead to unnecessary overhead? I mean, there are *a lot* of various > SELECT statements generated by even a simple Rails application. Does it > really make sense to prepare every one of them? Having backends cache the > execution plan for rare SELECTs can possibly have undesirable overhead. > Also, how will ActiveRecord know how to reuse these statements? For example: > a = Author.find(1) > The first and the last query are different to AR, yet they take a same shape after using them once, so they will be reparsed twice. Right now I'm trying to make it actually work and getting the framework in place. Optimization can be done later (and I'm fairly confident that it can be optimized). In the future I can add caching. The cache will have a limited size, and items can be removed based on least-recently-used or some other criteria, similar to how CPU caches work. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||