Home » RDBMS Server » Performance Tuning » HELP! very high in cpu usage
HELP! very high in cpu usage [message #179451] Tue, 27 June 2006 08:38 Go to next message
alicia
Messages: 12
Registered: June 2006
Location: Malaysia
Junior Member

Hi experts,

Below is the execution plan for the my query. The cost is okay for me, of course lower is better.
I test to run this query in 10 threads concurrently, the cpu reachs 100% constantly. Why this happend? is because of high in consistent gets? Or bad sql?
Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=59 Card=1 Bytes=304)
   1    0   SORT (AGGREGATE)
   2    1     HASH JOIN (OUTER) (Cost=59 Card=8847 Bytes=2689488)
   3    2       NESTED LOOPS (OUTER) (Cost=40 Card=2816 Bytes=751872)
   4    3         NESTED LOOPS (OUTER) (Cost=32 Card=2 Bytes=504)
   5    4           HASH JOIN (Cost=30 Card=2 Bytes=476)
   6    5             HASH JOIN (OUTER) (Cost=27 Card=10 Bytes=1190)
   7    6               TABLE ACCESS (BY INDEX ROWID) OF 'PO' (Cost=18
           Card=1 Bytes=60)

   8    7                 NESTED LOOPS (Cost=20 Card=10 Bytes=970)
   9    8                   REMOTE* (Cost=2 Card=1 Bytes=37)           AA_EADM
                                                                       IN

  10    8                   INDEX (RANGE SCAN) OF 'IDX_PO' (NO
          N-UNIQUE) (Cost=11 Card=10)

  11    6               VIEW (Cost=6 Card=389 Bytes=8558)
  12   11                 SORT (GROUP BY) (Cost=6 Card=389 Bytes=10114
          )

  13   12                   TABLE ACCESS (BY INDEX ROWID) OF 'PO_ACT' (Cost=2 Card=549 Bytes=14274)

  14   13                     INDEX (RANGE SCAN) OF 'ID_PO_ACT'
           (NON-UNIQUE) (Cost=1 Card=547)

  15    5             REMOTE* (Cost=2 Card=29 Bytes=3451)              AA_EADM
                                                                       IN

  16    4           INDEX (UNIQUE SCAN) OF 'REP_PO_ACT' (UNIQUE) (Cost
          =1 Card=1 Bytes=14)

  17    3         REMOTE*                                              AA_EADM
                                                                       IN

  18    2       REMOTE* (Cost=4 Card=14703 Bytes=544011)               AA_EADM
                                                                       IN



   9 SERIAL_FROM_REMOTE            SELECT "USERID","ORGANIZATIONID" FROM "USERS
                                   " "USERS" WHERE ("ORGANIZATIONID")=N

  15 SERIAL_FROM_REMOTE            SELECT "USERID","LOCATIONCODE","ORGANIZATION
                                   ID" FROM "USER_LOCATION" "USER_LOCAT

  17 SERIAL_FROM_REMOTE            SELECT "ORGANIZATIONID" FROM "ORGANIZATION"
                                   "ORGANIZATION" WHERE :1=("ORGANIZATI

  18 SERIAL_FROM_REMOTE            SELECT "ORGANIZATIONID","LOCATIONCODE" FROM
                                   "ORGANIZATION_LOCATION" "ORGANIZATIO



Statistics
----------------------------------------------------------
         28  recursive calls
          0  db block gets
      13697  consistent gets
          0  physical reads
          0  redo size
        380  bytes sent via SQL*Net to client
        504  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)
          1  rows processed


Plz advise.

Cheers/

[Updated on: Tue, 27 June 2006 20:39]

Report message to a moderator

Re: HELP! very high in cpu usage [message #179454 is a reply to message #179451] Tue, 27 June 2006 08:46 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Using dblinks? Did you try with DRIVING_SITE hint?
What method you used to collect statistics?
Could you post the DBMS_STATS command you used?
Re: HELP! very high in cpu usage [message #179538 is a reply to message #179454] Tue, 27 June 2006 20:43 Go to previous messageGo to next message
alicia
Messages: 12
Registered: June 2006
Location: Malaysia
Junior Member

HI Mahesh,

Before that, the cpu usage is okay. This problem happend after I run a script to purge my db tables. I have re-build my table indexes but the result is still the same. What is your opinion to defragment my indexes and tables to make my db faster?

Database: Oracle 9(i)

Cheers,
Alicia
Re: HELP! very high in cpu usage [message #179541 is a reply to message #179538] Tue, 27 June 2006 20:54 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Rebuilding the indexes may or may not fix the issues.
Still, you have not answered any of the questions i have asked.
>> This problem happend after I run a script to purge my db tables.
Did you collect statistics on tables/indexes after the purge?
If so , how?
Use the method said here in sticky
http://www.orafaq.com/forum/t/51267/42800/

[Updated on: Tue, 27 June 2006 20:54]

Report message to a moderator

Re: HELP! very high in cpu usage [message #179634 is a reply to message #179541] Wed, 28 June 2006 04:49 Go to previous messageGo to next message
alicia
Messages: 12
Registered: June 2006
Location: Malaysia
Junior Member

Hi there,

I think the problem is due to contention which is high in consistent get. do you think it would be help if increase in block size?

Re: HELP! very high in cpu usage [message #179638 is a reply to message #179634] Wed, 28 June 2006 04:56 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> I think the problem is due to contention which is high in consistent get.
What makes you to think so?
And you are still not answering any of my questions.

If you are expecting a particular answer, please let us know.
Re: HELP! very high in cpu usage [message #179649 is a reply to message #179638] Wed, 28 June 2006 05:30 Go to previous messageGo to next message
alicia
Messages: 12
Registered: June 2006
Location: Malaysia
Junior Member

sorry .. i just type set autotrace on.. then it show the statistic for me d ..
Re: HELP! very high in cpu usage [message #180374 is a reply to message #179638] Mon, 03 July 2006 05:36 Go to previous messageGo to next message
alicia
Messages: 12
Registered: June 2006
Location: Malaysia
Junior Member

hi Mahesh Rajendran,

i am so sorry din ans well ur question .. as i am a newbie for the Oracle .. and i am not sure what method they are using now .. T_T

I saw some tables of my db are already analyzed on 20 June 2006, but not all. And, how can i know wat method they are applying to compute the statistic? How much the impact on db performance if some r analyzed some r none?


Could you plz advise for that.

Thanks & Regards,
Alicia
Re: HELP! very high in cpu usage [message #180392 is a reply to message #180374] Mon, 03 July 2006 06:15 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I already said,
Quote:

Did you collect statistics on tables/indexes after the purge?
If so , how?
Use the method said here in sticky
http://www.orafaq.com/forum/t/51267/42800/

Read the sticky. Search forum for examples.
Use dbms_stats to collect statistics.
Are you using any database links?

[Updated on: Mon, 03 July 2006 06:15]

Report message to a moderator

Previous Topic: Index Creation Speed-up
Next Topic: Global Temporary Table - Creating Locks
Goto Forum:
  


Current Time: Wed Apr 17 22:40:28 CDT 2024