Last active
November 30, 2016 06:17
-
-
Save eneko/24a5897114911a1156176e31d386d257 to your computer and use it in GitHub Desktop.
Ergast MySQL indices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Constructor Standings | |
alter table constructorstandings add index (constructorid); | |
alter table constructorstandings add index (raceid); | |
alter table constructorstandings add unique index constructorrace (constructorid, raceid); | |
-- Drivers | |
alter table drivers add unique index driverref (driverref); | |
-- Driver Standings | |
alter table driverstandings add index (driverid); | |
alter table driverstandings add index (raceid); | |
alter table driverstandings add uniqueindex driverrace (driverid, raceid); | |
-- Races | |
alter table races modify column `date` DATE not null default '1900-01-01'; | |
alter table races add unique index yearround (year, round); | |
-- Results | |
alter table results add index (position); | |
alter table results add index (grid); | |
alter table results add index (driverid); | |
alter table results add index (constructorid); | |
alter table results add index (raceid); | |
alter table results add index driverrace (driverid, raceid); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment