Add database indices for storm report query performance
This commit is contained in:
parent
ee81af22f0
commit
231ae2dcca
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,12 @@ create table nexrad_storm_report (
|
|||
tornado_f_rating TEXT
|
||||
);
|
||||
|
||||
create index nexrad_storm_report_episode_id_idx on nexrad_storm_report (episode_id);
|
||||
create index nexrad_storm_report_event_type_idx on nexrad_storm_report (event_type);
|
||||
create index nexrad_storm_report_wfo_idx on nexrad_storm_report (wfo);
|
||||
create index nexrad_storm_report_timestamp_start_idx on nexrad_storm_report (timestamp_start);
|
||||
create index nexrad_storm_report_timestamp_end_idx on nexrad_storm_report (timestamp_end);
|
||||
|
||||
select
|
||||
AddGeometryColumn('nexrad_storm_report', 'coord_start', 4326, 'POINT', 'XY', 0),
|
||||
CreateSpatialIndex('nexrad_storm_report', 'coord_start');
|
||||
|
|
Loading…
Add table
Reference in a new issue