Some code optimizations in the work
(1)Avoid unnecessary nesting of loops in your code, and if there are nested loops in your code, see if you can refactor your code without
(2)Select into creates tables, resulting in DDL transactions, so DDL operations are best handled as separate transactions (for Oracle).
(3)Avoid executing Sql cyclically, accessing the database continuously consumes the most performance
(4)In sql statements, try to use union all instead of distinct, you can load the data first and then process duplicate data
(5)Try to use table variables instead of in, and temporary tables
(5)SQL statement, try not to use, will lead to full table scan