diff --git a/postgres/setup.sql b/postgres/setup.sql index c9e64d7..56ad72d 100644 --- a/postgres/setup.sql +++ b/postgres/setup.sql @@ -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,