SELECT util.search_path_append('util'); -- remove invalid rows -- remove rows with no taxon name -- this also helps simplify the aggregating validations queries DELETE FROM :table WHERE "taxonName" IS NULL -- removes 12571 of 122230 rows (122230 - 109659) ; -- runtime: 0.3 s ("288.312 ms") @starscream