Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query string generation should be improved #25

Open
yokolet opened this issue Dec 4, 2012 · 2 comments
Open

Query string generation should be improved #25

yokolet opened this issue Dec 4, 2012 · 2 comments

Comments

@yokolet
Copy link
Contributor

yokolet commented Dec 4, 2012

Currently, a query string holds all attributes for any query. This doesn't matter if a model has a couple of attributes. But, if the model has 100 attributes, 100 attributes will present in the single query string even though only one of attribute is needed.

Another problem is that the query string is generated every time the query happens. This will cause a performance issue especially under the circumstance that millions of queries rush within a minutes.

@avescodes
Copy link
Contributor

I've been toying with Query string generation (more generally fully-realized sets of attributes vs. lazy attributes).

Lazy attributes would certainly be more in line with the clojure/datomic way of doing things, but it is definitely a digression from what rubyists are accustomed to.

Any opinions?

On Tuesday, December 4, 2012 at 9:39 AM, Yoko Harada wrote:

Currently, a query string holds all attributes for any query. This doesn't matter if a model has a couple of attributes. But, if the model has 100 attributes, 100 attributes will present in the single query string even though only one of attribute is needed.
Another problem is that the query string is generated every time the query happens. This will cause a performance issue especially under the circumstance that millions of queries rush within a minites.


Reply to this email directly or view it on GitHub (#25).

@yokolet
Copy link
Contributor Author

yokolet commented Dec 5, 2012

Very interesting. But, would you explain about lazy attributes a bit more? Or, would you give me links I should look at?

We've already broken Ruby style API to use good side of Datomic. If lazy attributes contribute to performance, we should take that in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants