Hi John,

On Tue, Sep 7, 2010 at 1: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.
>

This doesn't prevent you using the IDs as key_names. Attempting to fetch an
entity that doesn't exist will simply return None for that entity.

-Nick Johnson


>
> 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
> >
> > > --
> > > 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]<google-appengine%[email protected]>
> .
> > > For more options, visit this group athttp://
> groups.google.com/group/google-appengine?hl=en.
>
> --
> 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]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
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