One major limitation of AppEngine is that you can only query the
datastore with a

'SELECT * FROM  myData'

meaning you must put ALL properties of each entity into memory.  This
gets you to a Memory error rather quickly, especially if you have many
properties for each entity.  In my app, I can only query about 100
entities at a time, nowhere near the expected 1000.

I am trying to hack a form of

'SELECT PropertyOne FROM  myData',

to just put that single property into memory (of course through a
broad range of many entities)

I was wondering if I could save memory by using a one-to-many format,
with ReferenceProperty.  For example, my entities are keyed by date,
so I thought of trying something like this:

class myDate(BaseModel):
        Date = db.DateProperty()

class PropertyOne(BaseModel):
        Date = db.ReferenceProperty(myDate, collection_name='prop1_ref')
        Value = db.FloatProperty()

...
etc. for each Property, each Ref'd to myDate.

My first question is: If I call ''SELECT * FROM  myDate'', will it put
all of the Referenced Properties into memory?  If so, that may kill
this idea, too.

Second, would this act like a way to query ONLY an individual
property, along with its Date?  Something like ''SELECT * FROM
PropertyOne'' ?  (using this method, there seems to be no reason to
reference the Property to myDate, just make several distinct Models.
But it would be great to tie them all to a single date when I pull
multiple properties.)

Thirdly, is there some other method of querying just a single
property, like myDate.PropertyOne, through a broad range of Dates,
without having to get all of the other properties crowding into
memory?

Hope that makes sense.  Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to