indexing on epoch_time for faster where queries
This commit is contained in:
parent
efc2a61520
commit
129caa06a4
|
@ -11,6 +11,9 @@ CREATE TABLE aqi (
|
|||
aqi_category VARCHAR(40) NOT NULL
|
||||
);
|
||||
|
||||
-- index for epoch_time where queries
|
||||
CREATE INDEX aqi_epochtime ON aqi (epoch_time DESC);
|
||||
|
||||
-- example aqi insert
|
||||
INSERT INTO aqi (
|
||||
epoch_time,
|
||||
|
@ -41,6 +44,9 @@ CREATE TABLE weather (
|
|||
weather_icon VARCHAR(3) NOT NULL
|
||||
);
|
||||
|
||||
-- index for epoch_time where queries
|
||||
CREATE INDEX weather_epochtime ON weather (epoch_time DESC);
|
||||
|
||||
-- example weather insert
|
||||
INSERT INTO weather (
|
||||
epoch_time,
|
||||
|
|
Loading…
Reference in New Issue