-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.sql
88 lines (59 loc) · 1.68 KB
/
index.sql
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
USE geonames;
CREATE INDEX idx_geoname_id
ON alternateNames(geonameid, isPreferredName);
CREATE INDEX idx_isolanguage
ON alternateNames(isoLanguage);
CREATE INDEX idx_code
ON admin1Codes(code);
CREATE UNIQUE INDEX ux_geoname_id
ON admin1Codes(geonameid);
CREATE INDEX idx_code
ON admin2Codes(code);
CREATE UNIQUE INDEX ux_geoname_id
ON admin2Codes(geonameid);
CREATE UNIQUE INDEX ux_admin5_code
ON admin5Codes(geonameid, code);
CREATE UNIQUE INDEX ux_code
ON featureCodes(code);
CREATE UNIQUE INDEX ux_code
ON continentCodes(code);
CREATE INDEX idx_iso_alpha2
ON countryInfo(iso_alpha2);
CREATE INDEX idx_iso_alpha3
ON countryInfo(iso_alpha3);
CREATE INDEX idx_iso_numeric
ON countryInfo(iso_numeric);
CREATE INDEX idx_continent
ON countryInfo(continent);
CREATE INDEX idx_geoname_id
ON countryInfo(geonameId);
CREATE UNIQUE INDEX ux_geoname_id
ON geoName(geonameid);
CREATE INDEX idx_country
ON geoName(country);
CREATE INDEX idx_timezone
ON geoName(timezone);
CREATE INDEX idx_fclass
ON geoName(fclass);
CREATE INDEX idx_admin1
ON geoName(admin1);
CREATE INDEX idx_admin2
ON geoName(admin2);
CREATE INDEX idx_latitude_longitude
ON geoName(latitude, longitude);
CREATE UNIQUE INDEX ux_hierarchy
ON hierarchy(type, childId, parentId);
CREATE INDEX idx_iso639_2
ON isoLanguages(iso639_2);
CREATE INDEX idx_latitude_longitude
ON noCountry(latitude, longitude);
CREATE UNIQUE INDEX ux_geoname_id
ON noCountry(geonameId);
CREATE INDEX idx_timezone
ON noCountry(timezone);
CREATE UNIQUE INDEX ux_geonameid
ON shapes(geonameid);
CREATE INDEX ux_timezone_id
ON timeZones(timeZoneId);
CREATE INDEX idx_geoname_id
ON userTags(geonameid);