Re: GEO Search with large table is very slow
Thanks Rick,
I believe that I have setup compound indexes. This is when you have multiple columns in a single index, correct?
I have a couple of questions about the way MySQL uses an index with multiple columns. Does it matter how the columns are ordered in the WHERE clause of the SQL statement? For instance, if my indexes is setup like "beds, baths, city", and my WHERE cluase is like "city = 1 AND baths = 2 AND beds = 2" will all of the columns still be used?
I thought that using "IN" was not a range. If it is a range, that is part of the problem because I use beds and baths in the very beginning of the SQL statement. Would it be better to use "beds = 1 OR beds = 2 OR beds = 3" rather than "beds IN(1,2,3)"?
When you have a compound index on multiple columns, it seems that there is a limit to the number of columns you can add. Since latitude and longitude are almost always unique (some properties don't have them), the unique combination of all columns can't be more than the number of rows in the table. Is this correct? In phpMyAdmin, the rows of an index is never bigger than the rows of the table.
Is there anyway to keep the table out of memory so I can see the real speed of the query? Or should I increase the memory buffer so that MySQL stores more in memory to speed things up. My guess is that I would have to increase the memory by a lot to satisfy all of the unique queries.
-Sean
Subject
Views
Written By
Posted
9189
March 11, 2009 01:35PM
3354
March 11, 2009 07:36PM
3450
March 13, 2009 08:12AM
3127
March 13, 2009 07:53PM
3394
March 18, 2009 09:27AM
5305
March 18, 2009 09:02PM
Re: GEO Search with large table is very slow
3530
April 04, 2009 07:03AM
3508
April 04, 2009 12:51PM
3005
April 06, 2009 09:59AM
2865
April 06, 2009 07:38PM
3117
March 15, 2009 07:41PM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
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.