Hi GAEfan

I really don't understand what you are trying to do.

Why do you want to fetch/retrieve all entities of a particular class/
kind.

This isn't a SQL environment and event if it was
wouldn't you want to select * from myData where <someclause is true or
otherwise>.

But in GAE that is meaningless..

The equivalent would be

myData.all().filter("some filter expression")
which would in theory return a list of instances of class myData.

Where myData is a class implementing db.Model (thats if your using the
django model style)

How would "select id,name,description from myData"  make sense in this
sort of environment ?

If you only get one an entity at a time, then if you get all
properties does it matter.
I think Objects/Entities are limited to a maximum size of    1MB
though that could be wrong
and you are limited to 1000 entities to be returned from any one
query.

The nature of you question really makes me wonder if you get the GAE
datastore model.

Rgds

Tim


On Sep 11, 10:04 am, GAEfan <[EMAIL PROTECTED]> wrote:
> 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