Home > database >  Insert into the select of optimization
Insert into the select of optimization

Time:10-01

Please comment on my side there is a store encapsulates the table data acquisition task
Cycle through
Insert/into/* + APPEND * t (1, t. t. 2) select/* + PARALLEL (a, 4) */a. 1, a. 2, NVL ((2 from the select c. c where a. 1=c. (1), 1) from a, where 1=1.

Most of the execution will soon be there is a lot of data table 7 w performed more than 50 minutes, more than 7 w pen same data table 1 seconds to execute, where is the problem?

CodePudding user response:

Information, analyzing the specific situation to you that what all didn't, can only by subjective speculation

CodePudding user response:

1, first take a look at the SQL query block unpleasant
2, probably because you added a concurrent, at the time your CPU practical rate is too high lead to encounter bottlenecks, need to check the CPU is
3, you can use the APPEND, you watch a high water level is high or bigger table pieces line (line link, migration), suggesting a guide or rebuild the tables listed in the table below

CodePudding user response:

refer to the second floor sxq129601 response:
1, first take a look at the SQL query block unpleasant
2, probably because you added a concurrent, at the time your CPU practical rate is too high lead to encounter bottlenecks, need to check the CPU is
3, you can use the APPEND, you watch a high water level is high or bigger table pieces line (line link, migration), suggesting a guide under the table or rebuild table


1. Look at the data query speed more than 7 w pen under less than 1 SEC query is complete;
2. Look at the execution time of CPU on the server, utilization rate is not high about 7%
3. Before each execution will DROP TABLE a CASCADE CONSTRAINTS PURGE; The create table again;

CodePudding user response:

refer to the second floor sxq129601 response:
1, first take a look at the SQL query block unpleasant
2, probably because you added a concurrent, at the time your CPU practical rate is too high lead to encounter bottlenecks, need to check the CPU is
3, you can use the APPEND, you watch a high water level is high or bigger table pieces line (line link, migration), suggesting a guide under the table or rebuild table


1. Query is wrong, enforce a select count (*) from (1, select a. a. from table 2). Should not be accurate

CodePudding user response:

More than 50 minutes when check the v $session_Wait view, take a look at what's inside waiting for events, targeted analysis to do

CodePudding user response:

A see know (2 from the select c. c where a. 1=c. (1), the problem with the
Write the left join fly up

CodePudding user response:

refer to 6th floor hi537638 response:
a look will know (2 from the select c. c where a. 1=c. (1), the problem with the
Write the left join run fly up


Does not change, because not only ran a piece, cycle called, the field mapping is different in each table
Other tables can be normal execution but this would run more than 50 minutes

CodePudding user response:

This is only suitable for SQL queries, not suitable for full table associated, or each record must traverse a C table, performance loss here

CodePudding user response:

If you do so to ensure that C table index, have the index will not slow
  • Related