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:
@@ -57,6 +57,8 @@ $$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE OR REPLACE FUNCTION place_island_polygon.refresh() RETURNS trigger AS
|
||||
$$
|
||||
DECLARE
|
||||
t TIMESTAMP WITH TIME ZONE := clock_timestamp();
|
||||
BEGIN
|
||||
RAISE LOG 'Refresh place_island_polygon';
|
||||
PERFORM update_osm_island_polygon(false);
|
||||
@@ -64,6 +66,8 @@ BEGIN
|
||||
DELETE FROM place_island_polygon.osm_ids;
|
||||
-- noinspection SqlWithoutWhere
|
||||
DELETE FROM place_island_polygon.updates;
|
||||
|
||||
RAISE LOG 'Refresh place_island_polygon done in %', age(clock_timestamp(), t);
|
||||
RETURN NULL;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
Reference in New Issue
Block a user