On Sep 7, 12:01 am, johnterran <[email protected]> wrote: > Hi Robert, > > I can't use the key_name. The ids are not from my site > i.e. > Lets say the ids are from twitter. I want to know how many of the > twitter users > are registered on my site. So the ids can exists in the datastore, > but it doesn't have to. > > Is the best way to get all the users and filter them manually similar > to what Niklas wrote? > > Thanks > John > > On Sep 6, 8:22 am, Robert Kluin <[email protected]> wrote: > > > It will not be possible to use IN for something like that. IN will > > execute a series of queries, and it is is capped at 30. > > > If possible, I would suggest you make the entity key_name the user's > > id. Then you can just build a list of keys and fetch those -- but I > > really doubt you'll get anything close to 10K on a single fetch. > > > Robert > > > On Mon, Sep 6, 2010 at 04:51, johnterran <[email protected]> wrote: > > > Hi > > > > In BigTable, what is the most efficient way to do a large IN query? > > > My IN parameter list is typically 500 but can be 10k+ > > > i.e. > > > class User(db.Model): > > > name = db.StringProperty(required = True) > > > id = db.StringProperty(required = True) > > > > given a list of ids that can consist of 10k list, i need to retrieve > > > all the names > > > users = db.GqlQuery("SELECT * FROM User where id IN :1", > > > ids) > > > > what is the best way to do this? > > > > Thanks > > > John class Match(db.Model):#match other with own user=db.UserProperty(verbose_name="myuser") reference=db.ReferenceProperty(OtherModel,collection_name='matched_users',verbose_name="Title")
Here a better(?) structure referenced model ie twitter.matched_users could do it or even in memcache for something like a dictionary or a table. Again I didn't program it only proposing similar structure which solved my logic matching entities according to nearly arbitrary matches So like making the query like a dictionary worked for blobs also "automatically" parametrized via get_serving_url ie finding the parametrization got querying 2 () only querying 1 just observing how query parametrizes. Regards Niklas (proposing Match class that also can work self-referencing) -- 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.
