Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

query serialised and not running in parallel

1912391Mar 26 2015 — edited May 8 2015

I ran this query but it runs in serial mode :

other queries  on this table run in parallel , even when executed simultaneously, only this query never runs in parallel how to make it run in parallel? tried hint but that didnt work

select max(report_time) from saidata.us_gn_1;

the table us_gn_1 and the index on it usi_gn_1 have  parallelism set on them to 32 but this query never runs in parallel but other queries on this table run in parallel, how can I  parallise this query

SQL> select max(report_time) from saidata.us_gn_1;

select max(report_time) from saidata.us_gn_1

                                     *

ERROR at line 1:

ORA-01013: user requested cancel of current operation

SQL> select

  2          /*dfo_number

  3        , */tq_id

  4        , cast(server_type as varchar2(10)) as server_type

  5        , instance

  6        , cast(process as varchar2(8)) as process

  7        , num_rows

  8        , round(ratio_to_report(num_rows) over (partition by dfo_number, tq_id, server_type) * 100) as "%"

  9        , cast(rpad('#', round(num_rows * 10 / nullif(max(num_rows) over (partition by dfo_number, tq_id, server_type), 0)), '#') as varchar2(10)) as graph

10        , round(bytes / 1024 / 1024) as mb

11        , round(bytes / nullif(num_rows, 0)) as "bytes/row"

12  from

13          v$pq_tqstat

14  order by

15          dfo_number

16        , tq_id

17        , server_type desc

18        , instance

19        , process

20  ;

no rows selected

explain plan

-------------------------------------------------------------------------------------------------------

| Id  | Operation                  | Name     | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |

-------------------------------------------------------------------------------------------------------

|   0 | SELECT STATEMENT           |          |     1 |     9 |  2677   (2)| 00:00:01 |       |       |

|   1 |  PARTITION RANGE ALL       |          |     1 |     9 |            |          |  2594 |     1 |

|   2 |   SORT AGGREGATE           |          |     1 |     9 |            |          |       |       |

|   3 |    PX COORDINATOR          |          |       |       |            |          |       |       |

|   4 |     PX SEND QC (RANDOM)    | :TQ10000 |     1 |     9 |            |          |       |       |

|   5 |      SORT AGGREGATE        |          |     1 |     9 |            |          |       |       |

|   6 |       PX BLOCK ITERATOR    |          |   683M|  5865M|  2677   (2)| 00:00:01 |     1 |     1 |

|   7 |        INDEX FAST FULL SCAN| USI_GN_1 |   683M|  5865M|  2677   (2)| 00:00:01 |     1 |  2594 |

-------------------------------------------------------------------------------------------------------

STATISTIC                                           VALUE

-------------------------------------------------- ----------

Servers In Use                                        206
Servers Available                                       1
Servers Started                                     48832
Servers Shutdown                                    48625
Servers Highwater                                     657
Servers Cleaned Up                                      0
Server Sessions                                   3177681
Memory Chunks Allocated                            751193
Memory Chunks Freed                                751030
Memory Chunks Current                                 163
Memory Chunks HWM                                    3744

STATISTIC                                           VALUE

-------------------------------------------------- ----------

Buffers Allocated                               151413855
Buffers Freed                                   151404020
Buffers Current                                      9835
Buffers HWM                                        231860

SQL> sho parameter parallel;

fast_start_parallel_rollback         string      LOW

parallel_adaptive_multi_user         boolean     TRUE

parallel_automatic_tuning            boolean     TRUE

parallel_degree_limit                string      CPU

parallel_degree_policy               string      MANUAL

parallel_execution_message_size      integer     16384

parallel_force_local                 boolean     FALSE

parallel_instance_group              string

parallel_io_cap_enabled              boolean     FALSE

parallel_max_servers                 integer     2000

parallel_min_percent                 integer     0

parallel_min_servers                 integer     0

parallel_min_time_threshold          string      AUTO

parallel_server                      boolean     TRUE

parallel_server_instances            integer     7

parallel_servers_target              integer     1000

parallel_threads_per_cpu             integer     2

recovery_parallelism                 integer     0

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2015
Added on Mar 26 2015
1 comment
652 views