6 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: Smart Caching Mapper...| From | Sent On | Attachments |
|---|---|---|
| Koen Bok | 28 May 2008 04:54 | |
| Koen Bok | 28 May 2008 05:48 | |
| Michael Bayer | 28 May 2008 07:39 | |
| az...@svilendobrev.com | 28 May 2008 08:06 | |
| az...@svilendobrev.com | 28 May 2008 09:13 | |
| az...@svilendobrev.com | 28 May 2008 09:21 |
| Subject: | [sqlalchemy] Re: Smart Caching Mapper Question![]() |
|---|---|
| From: | az...@svilendobrev.com (az...@svilendobrev.com) |
| Date: | 05/28/2008 08:06:43 AM |
| List: | com.googlegroups.sqlalchemy |
some time ago i posted a list of my ideas along this.. http://groups.google.com/group/sqlalchemy/browse_thread/thread/d886963fe58d7abb
be ware: its all pure theory. -1 (horizontal) (eager) loading ONLY of the needed row attributes, also hierarhicaly (a.b.c.d) -2 (vertical) simultanously loading of columns - e.g. the lazy attribites - wholly, or in portions/slices (depending on UI visibility or other slice-size) -3 skipping creation of objects - only using the data, if time of creation gets critical. For example a simple report for a name.alias and age of person, the creation of 100,000 Persons can be ommitted. To be able to do drill-down, the person.db_id would be needed+stored too. -4 cacheing of some aggregations/calculations in special columns/tables, so they're not re-invented everytime -5 translate the whole report - calculations, aggregations, grouping etc. into sql and use the result as is (with same thing about db_id's)
except the #4/aggregation which is pretty automated now, i dont have yet implementation of the rest. i think u're talking about #2 ?
ciao svilen
Hey All,
I have a conceptual question.
You have two ways to get relations; lazy and nonlazy. Nonlazy works great for saving queries but can get pretty slow with complicated joins. So I was wondering if there was a third way; pre fetching all the data for relations and let the mapper get the relation data from a cache instead of doing another query.
It's kinda hard to explain, so I wrote an example script at: http://paste.pocoo.org/show/55145/
I guess this should be possible by writing some MapperExtension? Did anyone do anything like this, or maybe has some pointers?
Thanks!
Koen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---




