[google-appengine] most efficient datapath for model with multiple references

2009-04-24 Thread tayknight
If I have a model like: class market(db.Model) expires = db.DateTimeProperty() class zones(db.Model) name = db.StringProperty() class siteuser(db.Model) username = db.StringProptery() zone = db.ReferenceProperty() class MarketZone(db.Model) market = db.ReferenceProperty(market) zon

[google-appengine] datastore timeout every time - on reads, not writes

2009-04-29 Thread tayknight
I have a problem. I'm getting datastore timeouts when doing reads. The code finished about 5% of the time. The code looks like: alerts = Alert.all().filter('expires >= ', datetime.datetime.now()) # ge active alerts for alert in alerts: #get the db.Keys from the ListProperty zones = ZoneMaster

[google-appengine] Re: datastore timeout every time - on reads, not writes

2009-04-29 Thread tayknight
And, I should add, this works perfecty (and quickly) from the development server's datastore. On Apr 29, 8:31 am, tayknight wrote: > I have a problem. I'm getting datastore timeouts when doing reads. The > code finished about 5% of the time. The code looks like: > > alert

[google-appengine] Re: datastore timeout every time - on reads, not writes

2009-04-30 Thread tayknight
ere is no limitation on it... > > > > > > On Wed, Apr 29, 2009 at 11:56 PM, tayknight wrote: > > > And, I should add, this works perfecty (and quickly) from the > > development server's datastore. > > > On Apr 29, 8:31 am, tayknight wrote: > >

[google-appengine] Re: datastore timeout every time - on reads, not writes

2009-04-30 Thread tayknight
I figured out that I needed to do a alerts = Alert.all().filter('expires >= ', datetime.datetime.now ()).fetch(1000) Apparently it is faster to do a fetch() than iterate over the values. On Apr 30, 7:28 pm, tayknight wrote: > Data is returned in development almost instantly. In