Here's my columns:
geo_coorss_lat [decimal (16,9)]
geo_coords_lon [decimal (16,9)]
The table contains over 250,000,000 rows so indexes are going to be needed in order to facilitate a query that can happen in a reasonable amount of time.
I'm looking at some of the documentation that's out there and it seems like there's more to this than just slapping an index on a table and expecting everything to hum (http://hackmysql.com/case1
). So, given that epiphany, here's the one and only query that's going to be executed against this table:
$don="SELECT * FROM Verizon WHERE (geo_coords_0>=$latitude_1
1 and geo_coords_1<=$longitude_2
I'm thinking I need an index on "posted_day," "geo_coords_lat" and "geo_coords_lon," but there's an order that I need to be sensitive to and I'm not sure how I add an index on "posted_day" in that my options appear to be either a string or an integer.
Bottom line: How do I add these indexes to my table so I'm doing it right the first time?