According to the docs, Reference properties are only fetched when needed:

"A ReferenceProperty property value can be used as if it were the model
instance of the referenced entity. If the referenced entity is not in
memory, using the property as an instance automatically fetches the entity
from the datastore."

http://code.google.com/appengine/docs/datastore/entitiesandmodels.html#References



On Thu, Sep 11, 2008 at 10:46 AM, GAEfan <[EMAIL PROTECTED]> wrote:

>
> Tim:
>
> Yes, I "get" the GAE datastore model.  (I do not want to pull EVERY
> entity... I left off the WHERE filtering for simplicity).  I have 60
> properties per entity.  I can only query about 100 entities before I
> get a Memory error.
>
> That is because a query fetches every property in every entity (within
> my filter).  Instead of just saying 'SELECT emailAddress FROM
> myMembers WHERE State = "CA"', GAE forces me to say
> 'SELECT FirstName, LastName, Address1, Address2, etc., etc....'
> because I can only do a 'SELECT *...'
>
> This is a terribly inefficient use of memory.  It is a wonder that in
> this gigantic, scalable, unlimited cloud of data, I can only pull a
> limited amount before I get the Memory error.
>
> If I want to pull 1000 email addresses out of my data, It would be far
> more efficient to just do a 'SELECT emailAddress FROM myMembers WHERE
> State = "CA"'.  Otherwise, I cannot do it, without multiple
> (inefficient) calls to the datastore.
>
> So, back to my question...  Do I have to break up my entity Properties
> into separate models.  Say, make a model with just the email
> addresses?  Then, I'd have to find a way to key them back together.
>
> I suspect that my original query, where I use ReferenceProperty to tie
> them together doesn't really solve the issue.  I suspect that a SELECT
> still pulls every property, Reference'd and non-Reference'd alike.
>
> But I would love someone from Google to clarify (and maybe offer a
> solution).
>
> Thank you for responding.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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