SELECT util.search_path_append('util'); SELECT create_if_not_exists($$CREATE INDEX $$||:table_str||%'__parent'||$$ ON $$||:table_str||$$ ("taxonObservation_ID")$$); -- runtime: 3 s ("3003.022 ms") @starscream SELECT mk_derived_col((:table_str, 'aggregateOrganismObservationID'), $$_join("taxonImportance_ID"::text, "STEMCOUNT_ID"::text)$$) ; -- runtime: 25 s ("26272.523 ms") @starscream SELECT create_if_not_exists($$ALTER TABLE $$||:table_str||$$ ADD PRIMARY KEY ("aggregateOrganismObservationID")$$); -- runtime: 30 s ("31202.934 ms") @starscream