Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2183
  • Last Modified:

Parallel hint not working in an insert

Here is my INSERT pseudo code.  How come parallel not working?  Working on another insert in the same database with same source table.  Thanks.

 INSERT /*+ append */ INTO BIG_TABLE
         SELECT   /*+ index (source_table my_idx1)  parallel_index(source_table, my_idx1,14)
                DISTINCT  ...
                    FROM
                  (SELECT /*+ index (source_table my_idx1)  parallel_index(source_table, my_idx1,14)
                                 from ....big query)
            where ...
0
ewang1205
Asked:
ewang1205
  • 5
  • 2
3 Solutions
 
sujith80Commented:
what is the result of the following from sqlplus:

show parameter parallel
0
 
ewang1205Author Commented:
Here is the results.  Parallel works on this server because some other parallel queries work fine.  I guess my query may be too complex.

SQL> show parameter parallel;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------
fast_start_parallel_rollback         string      LOW
parallel_adaptive_multi_user         boolean     TRUE
parallel_automatic_tuning            boolean     FALSE
parallel_execution_message_size      integer     2152
parallel_instance_group              string
parallel_max_servers                 integer     385
parallel_min_percent                 integer     0
parallel_min_servers                 integer     0
parallel_server                      boolean     FALSE
parallel_server_instances            integer     1
parallel_threads_per_cpu             integer     2
recovery_parallelism                 integer     0
0
 
ewang1205Author Commented:
Might be limitation on parallel.  Will parallel still work if I have ROLLUP function in the SQL query?  Thanks.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
ewang1205Author Commented:
Looks like parallel doesn't work on ROLLUP function in the SQL query.  I tried without ROLLUP function in the SQL query and parallel hint works.  
0
 
sujith80Commented:
the settings looks fine to me.

Parallelism doesnt work for query part or the insert part? or for both?
0
 
ewang1205Author Commented:
Parallelism doesnt work for query part .  
0
 
ewang1205Author Commented:
I conclude the parallel doesn't always work.  It doesn't work where the query is too complex.  In my case, the query has analytical function called rollup, the parallel  doesn't work.  I will accept my answer as solution if there is no other objections.  Thanks.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now