DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Parallel Query and CPUs

  1. #11
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    I'm not sure if this was supposed to be the output. I agree i have never worked on parellel execution before but this was not what we expected.

    The table was analyzed, no indexes, parallel_automatic_tuning is set to true. But still...

    Code:
    SQL> conn scott/tiger
    Connected.
    SQL> select count(*) from my_test;
    
      COUNT(*)
    ----------
        361374
    
    Elapsed: 00:00:04.08
    SQL> select /*+parallel (my_test,2)*/ count(*) from my_test;
    
      COUNT(*)
    ----------
        361374
    
    Elapsed: 00:00:05.07
    SQL> set autot trace exp
    SQL> select count(*) from my_test;
    Elapsed: 00:00:00.00
    
    Execution Plan
    ----------------------------------------------------------
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=431 Card=1)
       1    0   SORT (AGGREGATE)
       2    1     TABLE ACCESS (FULL) OF 'MY_TEST' (Cost=431 Card=361374)
    
    
    
    SQL> select /*+parallel (my_test,2)*/ count(*) from my_test;
    Elapsed: 00:00:00.00
    
    Execution Plan
    ----------------------------------------------------------
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=216 Card=1)
       1    0   SORT (AGGREGATE)
       2    1     SORT* (AGGREGATE)                                        :Q5000
       3    2       TABLE ACCESS* (FULL) OF 'MY_TEST' (Cost=216 Card=36137 :Q5000
              4)
    
    
    
       2 PARALLEL_TO_SERIAL            SELECT /*+ PIV_SSF */ SYS_OP_MSR(COUNT(*)) 
                                       FROM (SELECT /*+ NO_EXPAND ROWID(A2)
    
       3 PARALLEL_COMBINED_WITH_PARENT
    
    SQL>
    I'm in doubt ?? Why this one behave differently than the one you showed Jurij. I'll try with larger amount of data...
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  2. #12
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    What is your disk layout? How is the MY_TEST distributed on disks? Different extents on different disks? Is it partitioned table? Partitions on different disks?

    If the whole table is located on one disk then FTS in parallel will definitely be slower than the serial one, even if you have many CPUs.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #13
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Originally posted by jmodic
    If the whole table is located on one disk then FTS in parallel will definitely be slower than the serial one, even if you have many CPUs.
    That solves my querry , yes the datafile is on one disk, and its a non partitioned table.

    Thanks
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width