MySQL Forums
Forum List  »  Performance

Re: Unused index, slow query
Posted by: Rick James
Date: May 28, 2008 12:08AM

This is a self-join; the <> is just to eliminate the one case of a person and himself. Ignore index issues on that.

You are looking for two people (dots on a grid?) that are "near" each other. This is a non-trivial task. It will have to do a full table scan on the second one unless...

* use geo indexing (don't know details)
* radically change your data structure to put items in bins, and first decide which bins are worth looking in.

Options: ReplyQuote


Subject
Views
Written By
Posted
4406
May 20, 2008 06:48AM
1727
May 21, 2008 09:08PM
Re: Unused index, slow query
1531
May 28, 2008 12:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.