Add timers to trigger function (#1006)
Add timer to all trigger refresh functions to help point where the time is spend on update.
This commit is contained in:
@@ -102,11 +102,15 @@ $$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE OR REPLACE FUNCTION buildings.refresh() RETURNS trigger AS
|
||||
$$
|
||||
DECLARE
|
||||
t TIMESTAMP WITH TIME ZONE := clock_timestamp();
|
||||
BEGIN
|
||||
RAISE LOG 'Refresh buildings block';
|
||||
REFRESH MATERIALIZED VIEW osm_building_block_gen1;
|
||||
-- noinspection SqlWithoutWhere
|
||||
DELETE FROM buildings.updates;
|
||||
|
||||
RAISE LOG 'Update buildings block done in %', age(clock_timestamp(), t);
|
||||
RETURN NULL;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
Reference in New Issue
Block a user