Hi Carlos,

Entities are always fetched in entirety - there's no way to query for only
specific fields in an entity. In cases where you have a large Blob such as
an uploaded image, it's often a good idea to split it into 'data' and
'metadata' entities, so you only fetch the actual image when you need to
return it.

-Nick Johnson

On Sun, Sep 20, 2009 at 12:56 PM, Carlos <[email protected]> wrote:

>
> I've been looking closely at the datastore quotas, and couldn't
> readily find an answer to this.
>
> Storage is cheap, so no one should ever fear storing large amounts of
> data safely in the datastore (and paying for it if necessary).  That's
> what it was built for.
>
> However, I'm wondering about communication efficiency between the
> datastore and an application.  In the datastore overview, the docs
> say:
>
> "A query can also limit the number of results returned by the
> datastore to conserve memory and run time."
>
> and then the "Getting, Creating, and Deleting data" page says:
>
> "Query and GqlQuery objects do not execute the query until the
> application tries to access the results. When the application accesses
> results, the query is executed, and results are loaded into memory as
> instances of the model class for the query."
>
> My question is, does "accessing the results" retrieve all of the
> entity properties, meaning it counts against the "Data Received from
> API" quota?
>
>
> Imagine a data model where you store images.  Sometimes you just want
> the metadata about the image (name, width, height, tags) and sometimes
> you want to retrieve the image blob itself.  Since neither Query or
> GqlQuery let you specify which properties to return, does the image
> blob get returned every time you fetch results?  I'd think not with
> the proper use of indexes, but I can't find documentation that says
> so. The "Data Received from API" quota is huge, but my concern is the
> "conserve memory and run time" in general.
>
>
>
>
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

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