File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
internal/core/data/embed/sql/versions/4.1.0-dev Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,9 @@ ALTER TABLE core_data.device_info ADD COLUMN IF NOT EXISTS mark_deleted BOOLEAN
99CREATE INDEX IF NOT EXISTS idx_reading_event_id ON core_data .reading (event_id);
1010
1111ALTER TABLE core_data .reading ADD COLUMN IF NOT EXISTS numeric_value NUMERIC ;
12+
13+ -- create index on reading(device_info_id) to enhance the performance of queries that join reading with device_info on device_info_id
14+ CREATE INDEX IF NOT EXISTS idx_reading_device_info_id ON core_data .reading (device_info_id);
15+
16+ -- create index on event(device_info_id) to enhance the performance of queries that join event with device_info on device_info_id
17+ CREATE INDEX IF NOT EXISTS idx_event_device_info_id ON core_data .event (device_info_id);
You can’t perform that action at this time.
0 commit comments