From fa4ac974d4bdd83009222907a331813a394d0396 Mon Sep 17 00:00:00 2001 From: Agnieszka Figiel Date: Tue, 1 Oct 2013 14:12:04 +0100 Subject: [PATCH] remove taxonomic position recalculation from on insert trigger --- db/plpgsql/001_rebuild_taxonomy.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/plpgsql/001_rebuild_taxonomy.sql b/db/plpgsql/001_rebuild_taxonomy.sql index 84b4b55270..a99410ee7b 100644 --- a/db/plpgsql/001_rebuild_taxonomy.sql +++ b/db/plpgsql/001_rebuild_taxonomy.sql @@ -286,7 +286,11 @@ CREATE OR REPLACE FUNCTION rebuild_taxonomy_for_node(node_id integer) RETURNS vo FROM q WHERE taxon_concepts.id = q.id; - PERFORM rebuild_taxonomic_positions_for_node(node_id); + -- do not recalculate position for individual node + -- as it takes too long to run on insert trigger + IF node_id IS NULL THEN + PERFORM rebuild_taxonomic_positions_for_node(node_id); + END IF; END; $$;