summaryrefslogtreecommitdiff
path: root/import/01b_indexes.sql
blob: d3ca687e16c0c7d1e1a74f6568b98de1df3a6322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- Indexes for table circuits
ALTER TABLE circuits
   ADD INDEX country (country);

-- Indexes for table constructorResults
ALTER TABLE constructorResults
   ADD INDEX status (status);

-- Indexes for table constructors
ALTER TABLE constructors
   ADD INDEX nationality (nationality);

-- Indexes for table drivers
ALTER TABLE drivers
   ADD INDEX number (number),
   ADD INDEX code (code),
   ADD INDEX dob (dob),
   ADD INDEX nationality (nationality);

-- Indexes for table driverStandings
ALTER TABLE driverStandings
   ADD INDEX position (position),
   ADD INDEX points (points),
   ADD INDEX positionText (positionText);

-- Indexes for table lapTimes
ALTER TABLE lapTimes
   ADD INDEX position (position),
   ADD INDEX lap (lap);

-- Indexes for table pitStops
ALTER TABLE pitStops
   ADD INDEX stop (stop),
   ADD INDEX lap (lap);

-- Indexes for table qualifying
ALTER TABLE qualifying
   ADD INDEX position (position);

-- Indexes for table races
ALTER TABLE races
   ADD INDEX year (year),
   ADD INDEX date (date);

-- Indexes for table results
ALTER TABLE results
   ADD INDEX rank (rank),
   ADD INDEX points (points),
   ADD INDEX positionOrder (positionOrder),
   ADD INDEX positionText (positionText),
   ADD INDEX position (position),
   ADD INDEX grid (grid),
   ADD INDEX number (number);

-- Indexes for table status
ALTER TABLE status
   ADD INDEX status (status);