Upgrade from v3.3 to v3.6
Preparation by Manually Creating Database Indexes
This update introduces several new database indexes to improve long-term frontend performance. Creating these indexes can take some time, depending on the number of connected sensors.
To minimize downtime during the update, you can create the indexes manually beforehand. This step is optional.
If you do not create the indexes manually, they will be created automatically as part of the update.
Notice
Manually creating indexes requires SQL and database knowledge. Only perform this step if you are familiar with these topics.
Procedure
- Update the PureLife Cloud to version 3.3.
- Execute the following SQL statements at runtime with PureLife Cloud version 3.3.
- Verify that the indexes were created successfully.
- Update the PureLife Cloud to version 3.6.
1CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_sensor_id_create_date_type ON sensor_event USING btree (sensor_id, create_date DESC, "type");
2CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_content_gin ON sensor_event USING GIN ("content");
3CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_extracted_content_gin ON sensor_event USING GIN (extracted_content) WHERE extracted_content <> '{}'::jsonb;
4CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_sensor_id_type ON sensor_event USING btree (sensor_id, "type");
5CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_heatmap_fall ON sensor_event (sensor_id, create_date) WHERE "type" = 'fall';
6CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_calendar_fall ON sensor_event (sensor_id, create_date) WHERE "type" = 'fall' AND "action" = 'calling';
7CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_register ON sensor_event (sensor_id, create_date DESC) WHERE "type" = 'register';
8CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_walking_time ON sensor_event (sensor_id, create_date) WHERE
9 "type" = 'status' AND jsonb_path_match("content", '$."walkingTimeSeconds" > 0');
10CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_heatmap_presence_vayyar ON sensor_event (sensor_id, create_date) WHERE
11 "type" = 'presence' AND "action" = 'presence' AND
12 jsonb_path_match("content", '$.payload.trackerTargets.size() > 0');
13CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_heatmap_presence ON sensor_event (sensor_id, create_date) WHERE
14 "type" = 'presence' AND "action" = 'presence' AND
15 jsonb_path_match("extracted_content", '$.targets.size() > 0');
16CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_sensor_event_unknown_search ON sensor_event (create_date) WHERE "type" = 'unknown';
17DROP INDEX CONCURRENTLY IF EXISTS idx_sensor_event_type_and_action;
18DROP INDEX CONCURRENTLY IF EXISTS idx_sensor_event_type;
19DROP INDEX CONCURRENTLY IF EXISTS idx_sensor_event_action;
Debian
- Follow the general instructions.
Docker
If you have modified the configuration files of your Docker installation, you can check GitHub to see how the configuration has changed.
- Follow the general instructions.
Previous
Upgrade from v2.x to v3.xNext
Overview