22 lines
766 B
Markdown
22 lines
766 B
Markdown
# MySQL Haversine Benchmark
|
|
|
|
1. Run setup
|
|
|
|
```sh
|
|
mysql your-database-name < setup.sql
|
|
```
|
|
|
|
This will (re)create:
|
|
- Four tables: `floats`, `floats_indexed`, `points`, and `points_indexed`.
|
|
- Nine procedures: `generate_coords`, `float_coords_within_radius`,
|
|
`float_indexed_coords_within_radius`, `hybrid_coords_within_radius`
|
|
`hybrid_coords_within_radius_point`, `hybrid_indexed_coords_within_radius`,
|
|
`hybrid_indexed_coords_within_radius_point`, `point_coords_within_radius`,
|
|
`point_indexed_coords_within_radius`
|
|
- Two functions: `haversine` and `haversine_alt`.
|
|
|
|
And then will generate and insert 1,000,000 random coordinates into each of
|
|
the four tables.
|
|
|
|
2. Navigate to `index.php` in your browser and login.
|