Hi NIck

Thank you so much! So if I have merge join queries and if I can spare
resources on a custom index, there may be room for improvement on read
performance? I guess I could find this out with a larger data set on
the production server and query before / after building a custom
index.

Herbert

On Apr 28, 5:38 pm, "Nick Johnson (Google)" <[email protected]>
wrote:
> Hi Herbert,
>
> Merge join queries - queries with multiple equality filters but no
> inequalities or sort orders - are a special case. They can be satisfied
> using the built in indexes and a merge join strategy, but they can also use
> a custom index. The production environment will use the index if it's
> present, and otherwise will do a merge join.
>
> Generally, a merge join works well, but there are situations in which it
> doesn't - in which case you may need to add an explicit index.
>
> -Nick Johnson
>
>
>
> On Wed, Apr 28, 2010 at 4:42 AM, Herbert <[email protected]> wrote:
> > Hi Nick
>
> > Thank you. One thing I'm still a bit confused about index. I had the
> > impression that if I've executed all kinds of queries before I deploy,
> > all required indexes would be included, am I correct?
>
> > Does building a custom index improve performance on complex queries
> > even though it is not required? Or I could just stick to the rules
> > from the doc, and make sure I cover all queries before I deploy?
>
> > Thanks!
>
> > On Apr 27, 6:59 pm, "Nick Johnson (Google)" <[email protected]>
> > wrote:
> > > Hi Herbert,
>
> > > A query like this will use the merge join strategy by default. If it's
> > too
> > > slow for the merge join strategy, you could have to build a custom index
> > for
> > > it, which would indeed be 'exploding'  - each User entity would have
> > > len(friends)*len(likes) index entries.
>
> > > -Nick
>
> > > On Mon, Apr 26, 2010 at 3:20 PM, Herbert <[email protected]> wrote:
> > > > Sorry, suddenly got a thought on it.
>
> > > > Can I do two equality check on both User.friends and User.likes ?
> > > > would that be cause an "exploding index?"
>
> > > > I.E. User.all().filter("friends =", me).filter("likes =", A).fetch(3)
>
> > > > thanks!
> > > > Herbert
>
> > > > --
> > > > 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]>
> > <google-appengine%[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]<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 
> 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].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to