Tuning a sql to remove cpu intensive operations

Along the simliar lines of the other thread but we want to tune a sql to reduce cpu impact. Its a complicated sql, joins subqueries, with etc.
What tools/web pages/blogs should I focus on for this topic?
An explain plan shows cpu .. is that showing the best picture? Is it that obvious? The i/o and overall cost is quite good at under 1000 and it seems the performance is okay at 1-2s .. but multiply that by a 1000 calls a second and we see cpu climb.
Trying to get every last bit out of the boxes before tipping over the 96 cpus.
I think I will take a stab at a complete re-write of the developers sql to see what can be done with a new set of eyes.
I guess tkprof will show me cpu - if its large enough to show .. I suppose I can run it for all the variations that look promising.
Daryl.

Hi,
Along the simliar lines of the other thread but we want to tune a sql to reduce cpu impact. Its a complicated sql, joins subqueries, with etc.
What tools/web pages/blogs should I focus on for this topic?SQL plan will be best for you to understand what your query is doing.
An explain plan shows cpu .. is that showing the best picture? Is it that obvious? The i/o and overall cost is quite good at under 1000 and it seems the performance is okay at 1-2s .. >but multiply that by a 1000 calls a second and we see cpu climb.How can you say that cost under 1000 is a good cost? You can have a query with a cost of 100 having execution time of 2 hours and a query with cost of 100000 retuning you within a few seconds. So, don't concentrate on the cost.
If a query is returning in one second, and you are executing same query 1000 times within a seconds than query might not have a problem, rather you need to concentrate that how can you reduce the number of executions.
I guess tkprof will show me cpu - if its large enough to show .. I suppose I can run it for all the variations that look promising.Do a 10046 tracing for your SQL and tkprof the trace file to see the time spent on each step of the query execution. Actually there are thousands of advices which you can take to improve your particular SQL and for this you will need to do a google.
Salman

Similar Messages

  • Need clear steps for doing performance tuning on SQL Server 2008 R2 (DB Engine, Reporting Services and Integration Services)

    We have to inverstigate about a reporting solution where things are getting slow (may be material, database design, network matters).
    I have red a lot in MSDN and some books about performance tuning on SQL Server 2008 R2 (or other) but frankly, I feel a little lost in all that stuff
    I'am looking for practical steps in order to do the tuning. Someone had like a recipe for that : a success story...
    My (brain storm) Methodology should follow these steps:
     Resource bottlenecks: CPU, memory, and I/O bottlenecks
     tempdb bottlenecks
     A slow-running user query : Missing indexes, statistics,...
     Use performance counters : there are many, can one give us the list of the most important
    how to do fine tuning about SQL Server configuration
    SSRS, SSIS configuration ? 
    And do the recommandations.
    Thanks
    "there is no Royal Road to Mathematics, in other words, that I have only a very small head and must live with it..."
    Edsger W. Dijkstra

    Hello,
    There is no clear defined step which can be categorized as step by step to performance tuning.Your first goal is to find out cause or drill down to factor causing slowness of SQL server it can be poorly written query ,missing indexes,outdated stats.RAM crunch
    CPU crunch so on and so forth.
    I generally refer to below doc for SQL server tuning
    http://technet.microsoft.com/en-us/library/dd672789(v=sql.100).aspx
    For SSIS tuning i refer below doc.
    http://technet.microsoft.com/library/Cc966529#ECAA
    http://msdn.microsoft.com/en-us/library/ms137622(v=sql.105).aspx
    When I face issue i generally look at wait stats ,wait stats give you idea about on what resource query was waiting.
    --By Jonathan KehayiasSELECT TOP 10
    wait_type ,
    max_wait_time_ms wait_time_ms ,
    signal_wait_time_ms ,
    wait_time_ms - signal_wait_time_ms AS resource_wait_time_ms ,
    100.0 * wait_time_ms / SUM(wait_time_ms) OVER ( )
    AS percent_total_waits ,
    100.0 * signal_wait_time_ms / SUM(signal_wait_time_ms) OVER ( )
    AS percent_total_signal_waits ,
    100.0 * ( wait_time_ms - signal_wait_time_ms )
    / SUM(wait_time_ms) OVER ( ) AS percent_total_resource_waits
    FROM sys.dm_os_wait_stats
    WHERE wait_time_ms > 0 -- remove zero wait_time
    AND wait_type NOT IN -- filter out additional irrelevant waits
    ( 'SLEEP_TASK', 'BROKER_TASK_STOP', 'BROKER_TO_FLUSH',
    'SQLTRACE_BUFFER_FLUSH','CLR_AUTO_EVENT', 'CLR_MANUAL_EVENT',
    'LAZYWRITER_SLEEP', 'SLEEP_SYSTEMTASK', 'SLEEP_BPOOL_FLUSH',
    'BROKER_EVENTHANDLER', 'XE_DISPATCHER_WAIT', 'FT_IFTSHC_MUTEX',
    'CHECKPOINT_QUEUE', 'FT_IFTS_SCHEDULER_IDLE_WAIT',
    'BROKER_TRANSMITTER', 'FT_IFTSHC_MUTEX', 'KSOURCE_WAKEUP',
    'LAZYWRITER_SLEEP', 'LOGMGR_QUEUE', 'ONDEMAND_TASK_QUEUE',
    'REQUEST_FOR_DEADLOCK_SEARCH', 'XE_TIMER_EVENT', 'BAD_PAGE_PROCESS',
    'DBMIRROR_EVENTS_QUEUE', 'BROKER_RECEIVE_WAITFOR',
    'PREEMPTIVE_OS_GETPROCADDRESS', 'PREEMPTIVE_OS_AUTHENTICATIONOPS',
    'WAITFOR', 'DISPATCHER_QUEUE_SEMAPHORE', 'XE_DISPATCHER_JOIN',
    'RESOURCE_QUEUE' )
    ORDER BY wait_time_ms DESC
    use below link to analyze wait stats
    http://www.sqlskills.com/blogs/paul/wait-statistics-or-please-tell-me-where-it-hurts/
    HTH
    PS: for reporting services you can post in SSRS forum
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Awr show this sql as highest cpu consuming sql .Is this sql need tunning?

    Hi,
    As awr reports showing this sql as the highest CPU consumer
    Please consider me newbie and help me to understand this.
    Thanking you ..
    SQL ordered by CPU Time            DB/Inst:  Snaps: 
    -> Resources reported for PL/SQL code includes the resources used by all SQL
       statements called by the code.
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
       into the Total Database Time multiplied by 100
        CPU      Elapsed                  CPU per  % Total
      Time (s)   Time (s)  Executions     Exec (s) DB Time    SQL Id
         2,658      2,665            1     2658.18     5.7 5aawbyzqjk8by
    select distinct trp.site_id from tas_receipts_process trp , tas_tsa_info tti, ta
    s_site ts where trp.tsa_id = tti.tsa_id and tti.status = 1 and ts.site_id = trp
    .site_id and (tti.max_install != trp.pushed_rsn and ((tti.max_install = 0 and
    (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :1) or (tti.max_installComplete sql =>
    select distinct trp.site_id from tas_receipts_process trp , tas_tsa_info tti, tas_site
    ts
    where
    trp.tsa_id = tti.tsa_id
    and tti.status = 1
    and ts.site_id = trp.site_id 
    and
    tti.max_install != trp.pushed_rsn
    and  (
           (tti.max_install = 0 and
               (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :1
           ) or 
           (tti.max_install > 0 and
               (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :2
           ) or  
           (tti.max_install = trp.pushed_rsn and
           tti.max_install <> 0
    ) or
    (trp.pushed_time !=
    to_date(tti.created_date,'dd-MON-yyhh24:mi:ss') + (1/24/60) * ts.workahead_time
    ) and 
    to_date(sysdate,'dd-MON-yyhh24:mi:ss') + (1/24/60) * :3
      ) > trp.pushed_time
    )getting the explain plan for the above sql =>
    QL> SELECT plan_table_output FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR('g6c8y31xr06vp',0,'ALL'));
    PLAN_TABLE_OUTPUT
    SQL_ID  g6c8y31xr06vp, child number 0
    select distinct trp.site_id from tas_receipts_process trp , tas_tsa_info tti, tas_site
    ts  where trp.tsa_id = tti.tsa_id and tti.status = 1 and ts.site_id = trp.site_id  and
    (tti.max_install != trp.pushed_rsn and  ((tti.max_install = 0 and (trp.pushed_rsn -
    trp.curr_rsn) < ts.workahead_count * :1) or  (tti.max_install > 0 and (trp.pushed_rsn -
    trp.curr_rsn) < ts.workahead_count * :2) or   (tti.max_install = trp.pushed_rsn and
    tti.max_install <> 0 )  )) or (trp.pushed_time != (to_date(tti.created_date,'dd-MON-yy
    hh24:mi:ss') + (1/24/60) * ts.workahead_time) and  ((to_date(sysdate,'dd-MON-yy
    hh24:mi:ss') + (1/24/60) * :3) > trp.pushed_time))
    Plan hash value: 2862358316
    | Id  | Operation               | Name                 | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT        |                      |       |       |   601K(100)|          |
    |   1 |  HASH UNIQUE            |                      |     4 |   216 |   601K (10)| 02:00:14 |
    |   2 |   CONCATENATION         |                      |       |       |            |          |
    |   3 |    NESTED LOOPS         |                      |   200M|    10G|   579K  (6)| 01:55:52 |
    |   4 |     MERGE JOIN CARTESIAN|                      |  2849 | 99715 |    12   (0)| 00:00:01 |
    |   5 |      TABLE ACCESS FULL  | TAS_SITE             |     7 |    70 |     3   (0)| 00:00:01 |
    |   6 |      BUFFER SORT        |                      |   407 | 10175 |     9   (0)| 00:00:01 |
    |*  7 |       TABLE ACCESS FULL | TAS_RECEIPTS_PROCESS |   407 | 10175 |     1   (0)| 00:00:01 |
    |*  8 |     TABLE ACCESS FULL   | TAS_TSA_INFO         | 70411 |  1306K|   203   (6)| 00:00:03 |
    |*  9 |    HASH JOIN            |                      |     2 |   108 |   203   (2)| 00:00:03 |
    |* 10 |     HASH JOIN           |                      |   407 | 14245 |     7  (15)| 00:00:01 |
    |  11 |      TABLE ACCESS FULL  | TAS_SITE             |     7 |    70 |     3   (0)| 00:00:01 |
    |  12 |      TABLE ACCESS FULL  | TAS_RECEIPTS_PROCESS |   407 | 10175 |     3   (0)| 00:00:01 |
    |* 13 |     TABLE ACCESS FULL   | TAS_TSA_INFO         | 21474 |   398K|   196   (2)| 00:00:03 |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$1
       5 - SEL$1_1 / TS@SEL$1
       7 - SEL$1_1 / TRP@SEL$1
       8 - SEL$1_1 / TTI@SEL$1
      11 - SEL$1_2 / TS@SEL$1_2
      12 - SEL$1_2 / TRP@SEL$1_2
      13 - SEL$1_2 / TTI@SEL$1_2
    Predicate Information (identified by operation id):
       7 - filter("TRP"."PUSHED_TIME"<TO_DATE(TO_CHAR(SYSDATE@!),'dd-MON-yy
                  hh24:mi:ss')+.000694444444444444444444444444444444444445*:3)
       8 - filter("TRP"."PUSHED_TIME"<>TO_DATE(INTERNAL_FUNCTION("TTI"."CREATED_DATE"),'dd-M
                  ON-yy hh24:mi:ss')+.000694444444444444444444444444444444444445*"TS"."WORKAHEAD_TIME")
       9 - access("TRP"."TSA_ID"="TTI"."TSA_ID")
           filter(("TTI"."MAX_INSTALL"<>"TRP"."PUSHED_RSN" AND (("TTI"."MAX_INSTALL"=0 AND
                  "TRP"."PUSHED_RSN"-"TRP"."CURR_RSN"<"TS"."WORKAHEAD_COUNT"*:1) OR
                  ("TTI"."MAX_INSTALL">0 AND "TRP"."PUSHED_RSN"-"TRP"."CURR_RSN"<"TS"."WORKAHEAD_COUNT"*:2
                  ) OR ("TTI"."MAX_INSTALL"="TRP"."PUSHED_RSN" AND "TTI"."MAX_INSTALL"<>0)) AND
                  (LNNVL("TRP"."PUSHED_TIME"<TO_DATE(TO_CHAR(SYSDATE@!),'dd-MON-yy
                  hh24:mi:ss')+.000694444444444444444444444444444444444445*:3) OR
                  LNNVL("TRP"."PUSHED_TIME"<>TO_DATE(INTERNAL_FUNCTION("TTI"."CREATED_DATE"),'dd-MON-yy
                  hh24:mi:ss')+.000694444444444444444444444444444444444445*"TS"."WORKAHEAD_TIME"))))
      10 - access("TS"."SITE_ID"="TRP"."SITE_ID")
      13 - filter("TTI"."STATUS"=1)
    Column Projection Information (identified by operation id):
       1 - "TRP"."SITE_ID"[NUMBER,22]
       2 - "TS"."SITE_ID"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22], "TRP"."TSA_ID"[NUMBER,22],
           "TRP"."SITE_ID"[NUMBER,22], "TRP"."CURR_RSN"[NUMBER,22], "TRP"."PUSHED_RSN"[NUMBER,22],
           "TRP"."PUSHED_TIME"[DATE,7], "TTI"."TSA_ID"[NUMBER,22], "TTI"."STATUS"[NUMBER,22],
           "TTI"."MAX_INSTALL"[NUMBER,22], "TTI"."CREATED_DATE"[DATE,7]
       3 - "TS"."SITE_ID"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22], "TRP"."TSA_ID"[NUMBER,22],
           "TRP"."SITE_ID"[NUMBER,22], "TRP"."CURR_RSN"[NUMBER,22], "TRP"."PUSHED_RSN"[NUMBER,22],
           "TRP"."PUSHED_TIME"[DATE,7], "TTI"."TSA_ID"[NUMBER,22], "TTI"."STATUS"[NUMBER,22],
           "TTI"."MAX_INSTALL"[NUMBER,22], "TTI"."CREATED_DATE"[DATE,7]
       4 - "TS"."SITE_ID"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22], "TRP"."TSA_ID"[NUMBER,22],
           "TRP"."SITE_ID"[NUMBER,22], "TRP"."CURR_RSN"[NUMBER,22], "TRP"."PUSHED_RSN"[NUMBER,22],
           "TRP"."PUSHED_TIME"[DATE,7]
       5 - "TS"."SITE_ID"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22]
       6 - (#keys=0) "TRP"."TSA_ID"[NUMBER,22], "TRP"."SITE_ID"[NUMBER,22],
           "TRP"."CURR_RSN"[NUMBER,22], "TRP"."PUSHED_RSN"[NUMBER,22], "TRP"."PUSHED_TIME"[DATE,7]
       7 - "TRP"."TSA_ID"[NUMBER,22], "TRP"."SITE_ID"[NUMBER,22],
           "TRP"."CURR_RSN"[NUMBER,22], "TRP"."PUSHED_RSN"[NUMBER,22], "TRP"."PUSHED_TIME"[DATE,7]
       8 - "TTI"."TSA_ID"[NUMBER,22], "TTI"."STATUS"[NUMBER,22],
           "TTI"."MAX_INSTALL"[NUMBER,22], "TTI"."CREATED_DATE"[DATE,7]
       9 - (#keys=1) "TRP"."TSA_ID"[NUMBER,22], "TTI"."TSA_ID"[NUMBER,22],
           "TS"."SITE_ID"[NUMBER,22], "TRP"."SITE_ID"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TRP"."PUSHED_RSN"[NUMBER,22], "TRP"."PUSHED_TIME"[DATE,7],
           "TRP"."CURR_RSN"[NUMBER,22], "TTI"."CREATED_DATE"[DATE,7], "TTI"."STATUS"[NUMBER,22],
           "TTI"."MAX_INSTALL"[NUMBER,22]
      10 - (#keys=1) "TS"."SITE_ID"[NUMBER,22], "TRP"."SITE_ID"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TRP"."TSA_ID"[NUMBER,22], "TRP"."PUSHED_TIME"[DATE,7], "TRP"."CURR_RSN"[NUMBER,22],
           "TRP"."PUSHED_RSN"[NUMBER,22]
      11 - "TS"."SITE_ID"[NUMBER,22], "TS"."WORKAHEAD_COUNT"[NUMBER,22],
           "TS"."WORKAHEAD_TIME"[NUMBER,22]
      12 - "TRP"."TSA_ID"[NUMBER,22], "TRP"."SITE_ID"[NUMBER,22],
           "TRP"."CURR_RSN"[NUMBER,22], "TRP"."PUSHED_RSN"[NUMBER,22], "TRP"."PUSHED_TIME"[DATE,7]
      13 - "TTI"."TSA_ID"[NUMBER,22], "TTI"."STATUS"[NUMBER,22],
           "TTI"."MAX_INSTALL"[NUMBER,22], "TTI"."CREATED_DATE"[DATE,7]
    105 rows selected.sizes of concerned objects=>
    OWNER           SEGMENT_NAME                   SEGMENT_TYPE         TABLESPACE_NAME      EXTENTS           BYTES_
    AZD_SCHM     TAS_TSA_INFO                   TABLE                TATSU_DATA_TS             22        7,340,032
    AZD_SCHM     TAS_TSA_INFO_PK                INDEX                TATSU_DATA_TS             17        2,097,152
    AZD_SCHM     TAS_RECEIPTS_PROCESS           TABLE                TATSU_DATA_TS              1           65,536
    AZD_SCHM     TAS_RECEIPTS_PROCESS_IDX       INDEX                TATSU_INDEX_TS             1           65,536
    AZD_SCHM     TAS_SITE                       TABLE                TATSU_DATA_TS              1           65,536
    AZD_SCHM     TAS_SITE_NAME_UNQ              INDEX                TATSU_INDEX_TS             1           65,536
    AZD_SCHM     TAS_SITE_PK                    INDEX                TATSU_DATA_TS              1           65,536
    --------------- ------------------------------ -------------------- -------------------- ------- ----------------Please suggest how to tune this above SQL
    Does above sql plan looks good
    Any comment and help is highely appreciated.
    Thanks & Regards,
    IVW

    ivw wrote:
    Complete sql =>
    Please suggest how to tune this above SQL
    Does above sql plan looks good
    Any comment and help is highely appreciated.Your SQL is probably incorrectly using the OR operator. In its present form it means this:
    select distinct trp.site_id from tas_receipts_process trp , tas_tsa_info tti, tas_site
    ts
    where
    trp.tsa_id = tti.tsa_id
    and tti.status = 1
    and ts.site_id = trp.site_id 
    and
    tti.max_install != trp.pushed_rsn
    and  (
           (tti.max_install = 0 and
               (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :1
           ) or 
           (tti.max_install > 0 and
               (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :2
           ) or  
           (tti.max_install = trp.pushed_rsn and
           tti.max_install <> 0
    union all
    select distinct trp.site_id from tas_receipts_process trp , tas_tsa_info tti, tas_site
    ts
    where
    (trp.pushed_time !=
    to_date(tti.created_date,'dd-MON-yyhh24:mi:ss') + (1/24/60) * ts.workahead_time
    ) and 
    to_date(sysdate,'dd-MON-yyhh24:mi:ss') + (1/24/60) * :3
      ) > trp.pushed_time
    and not (above condition)So one of the two parts of the SQL are missing all the join predicates between the tables due to the OR operator at top level. The way the SQL is formatted, it might be meant to read like this:
    select distinct trp.site_id from tas_receipts_process trp , tas_tsa_info tti, tas_site
    ts
    where
    trp.tsa_id = tti.tsa_id
    and tti.status = 1
    and ts.site_id = trp.site_id 
    and
      (tti.max_install != trp.pushed_rsn
    and  (
           (tti.max_install = 0 and
               (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :1
           ) or 
           (tti.max_install > 0 and
               (trp.pushed_rsn - trp.curr_rsn) < ts.workahead_count * :2
           ) or  
           (tti.max_install = trp.pushed_rsn and
           tti.max_install <> 0
    or   (trp.pushed_time != to_date(tti.created_date,'dd-MON-yyhh24:mi:ss') + (1/24/60) * ts.workahead_time
          and to_date(sysdate,'dd-MON-yyhh24:mi:ss') + (1/24/60) * :3 > trp.pushed_time
    )But you need to find out what exactly it is supposed to express from a logical point of view. Very likely the present form is simply incorrect. Depending on your data correcting the usage of the OR operator might even render the DISTINCT operator redundant which is probably at present used to remove the many duplicates generated by the missing join predicates.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Sql using 100%cpu

    Hopefully someone will be able to advise me on something i am stuck on.
    this is the sql statement running from a client machine (windows xp) and is connected to a database on a db server running oracle linux and oracle 10.2.0.3 database.
    SELECT M.FID, M.ANCHORPOSITION, M.HEIGHT, M.ORIENTATION, M.TEXTSTRING, M.GEOM.SDO_POINT.X X, M.GEOM.SDO_POINT.Y Y
    FROM CARTOGRAPHICTEXT M
    WHERE M.FID IN (SELECT FID FROM CTDESCRIPTIVEGROUP WHERE DESCRIPTIVEGROUPID = 40)
    AND M.PROCESSED = 'F'
    during the execution of this statement, the following stats were determined.
    Total Per Execution Per Row
    Executions 1 1 0.00
    CPU Time (sec) 450745.25 450745.25 6.70
    Buffer Gets 1895169951 1895169951.00 28180.97
    Disk Reads 36611613 36611613.00 544.41
    Direct Writes 0 0.00 0.00
    Rows 67250 67250.00 1
    Fetches 2690 2690.00 0.04
    the table cartographictext has circa 1million rows and the select statement selecting from ctdescripitvegroup will return 12million rows.
    when viewing the top events in linux, oracle pid calling this sql is showing %cpu at 100. similarly when viewing the diagnostics in em console, the cpu is at 100%.
    the application runs a number of sql statements onthe table with varying where clauses. on similar sql events on another table prior to this, the first sql call to the table took 11 hours to complete, but the subsequent sql were completed in less then 2 minutes per call.
    the above statement has been running for 4 days now and only returned 67000 rows.
    having checked the other stats, i wasn't able to determine where the problem lies.
    some other stats gathered for the sql running were (name, value, per second, per transaction)
    session logical reads           15656741223.00           33714.06      196601.34
    db block changes           112877872.00           243.06           1417.40
    physical reads                43149624.00           92.92           541.83
    redo size (KB)                13437993.80           28.94           168.74
    execute count                2748199.00           5.92           34.51
    physical writes           2456826.00           5.29           30.85
    DB time (seconds)           1899189.45           4.09           23.85
    user calls                1085873.00           2.34           13.64
    opened cursors cumulative      1047893.00           2.26           13.16
    parse count (total)           1002199.00           2.16           12.58
    session cursor cache hits      696558.00           1.50           8.75
    workarea executions - optimal      504960.00           1.09           6.34
    user commits                75505.00           0.16           0.95
    user rollbacks                4132.00           0.01           0.05
    parse time elapsed (seconds)      50.86                0.00           0.00
    parse time cpu (seconds)      26.27                0.00           0.00
    workarea executions - onepass      16.00                0.00           0.00
    sql tuning advisor does flag it as not very well tuned, but then doesn't offer any recommendations. stats have been gathered on the tables. have tried some hints, but not to much success, explain plan said it was using a hash join right semi.
    any help would be appreiciated.

    execution plan for original sql
    12260902 rows selected.
    Elapsed: 00:03:15.46
    Execution Plan
    Plan hash value: 662574731
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost
    (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1476K| 108M| | 198K (3)| 00:39:39 |
    |* 1 | HASH JOIN RIGHT SEMI| | 1476K| 108M| 50M| 198K (3)| 00:39:39 |
    |* 2 | TABLE ACCESS FULL | CTDESCRIPTIVEGROUP | 1476K| 33M| | 20567 (4)| 00:04:07 |
    |* 3 | TABLE ACCESS FULL | CARTOGRAPHICTEXT | 22M| 1118M| | 106K (4)| 00:21:18 |
    Predicate Information (identified by operation id):
    1 - access("M"."FID"="FID")
    2 - filter("DESCRIPTIVEGROUPID"=40)
    3 - filter("M"."PROCESSED"='F')
    Statistics
    1905 recursive calls
    0 db block gets
    561135 consistent gets
    797262 physical reads
    0 redo size
    710207339 bytes sent via SQL*Net to client
    8991723 bytes received via SQL*Net from client
    817395 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    12260902 rows processed

  • Looking for Mac that can handle CPU intensive apps (Music & Video)

    Hi everyone, I am looking to get a new mac in the near future but wanted to know which Desktop mac is best for music and video? I was thinking of the new iMac but not sure if they are powerful enough? I need something that can handle CPU intensive stuff. I will be using it mainly for video editing and music producing

    In a nutshell,
    Look at the new 27 inch screen iMac models.
    Get the fastest optional CPU,
    Decide which optional GPU you'd be comfortable with.
    Get the base 8 GBs of RAM and then purchase extra, cheaper RAM through third party Mac RAM sellers.
    Then add as much RAM as you think you need. The 27 inch screen models can take up to 32 GBs of RAM.
    Decide on optional storage sizes.
    If you need a CD / DVD optical drive, these are no longer built-in and you will need to budget for a good external optical drive.
    Budget for 3-year extended AppleCare warranty service.
    In case of reliability issues with the first 5 years of operational life, the iMac will be covered with free warranty service for the first three years.
    Good Luck!

  • What does cpu intensive mean?

    I downloaded free trial of adobe audition 3, when trying to remove vocals to make karaoke song a message came up saying cpu intensive
    can anyone please tell me what this means, and the vocals where still there.
    Thank you
    mimsypoo

    Thanks for all the info,
    I tried remove vocals from various sources without success,so I guess
    this programme isn't any good for what i am trying to do or maybe it,s me.
    Thank you Mimsypoo
    durin <[email protected]> wrote:
    CPU Intensive warnings come up when using effects that are not suited for real-time use.  This means it's fine to use the effect on a file where you don't mind waiting a few minutes for it to do its thing, but you wouldn't want to plug the effect into a track and try to remove vocals from a microphone you're singing into.  It requires the computer to do too much calculation and it wouldn't be able to keep up.
    As for why your vocals were still there, vocal removal is a very complicated procedure, and honestly more often than not, you won't get satisfactory results.  When a song is mixed, often the vocal portion is placed in a very specific portion of the stereo field - usually right in the center so that both ears hear it equally.  When this is the case, you can usually isolate and remove this portion of the audio if you can determine where in that stereo field it is located.  Other songs, however, may spread the vocals out more broadly, process it with several effects that migrate around the stereo field, or even use multiple recordings of the same vocals in different locations.  This makes it much more difficult, as close to impossible as can be without fully committing myself, to accurately remove the vocals without affecting a significant portion of the rest of the track.
    >

  • Problem with animation and separate CPU intensive thread.

    Hi All,
    I'm in the process of writing a Java chess game with a computer AI. I've got everything working except for the animation of the computer making its move. Sometimes it works, sometimes it doesnt.
    Here's the problem:
    After the computer has finished deciding what move to make (CPU intensive - using standard Minimax w/ Alpha Beta pruning), the thread terminates passing the move to the animation thread (implemented using javax.swing.Timer). My delay is set to 50. But the multiple calls to repaint() in the Timer thread all get collapsed into one (they somehow get bunched up) causing a major display glitch!
    Sometimes this happens, sometimes it doesnt. I wanted to know if i could write some kind of wait function to wait until the CPU is free to process quick repaint() requests so that my animation can look descent all the time.
    Thanks for any help.
    jairam at ecf dot utoronto dot ca

    In the javax.swing.Timer class is a method called
    setCoalesque(boolean) (I think I spelled that wrong, but you will find it)
    By default the Timer class does exacltly what you mentioned, it merges multiple events into one when the application is too busy. Call setCoalesque(false) to receive all the events from the Timer.

  • Java.sql.SQLException: ORA-12535: TNS:operation timed out

    Hello,
    I am trying my first JDBC connection using a code sample called SingleConnection.
    The code functions properly until an attempt to connect to the database (the main goal to the exercise, I know). I receive a java.sql.SQLException: ORA-12535: TNS:operation timed out error. The ConnectString is all good, and several different values have been tried. Any help would be appreciated.
    Thanks,
    Jeff

    Hello,
    My problem is solved. It was a firewall issue.
    Cheers,
    Jeff

  • Permissions needed for Applying SQL Tuning Sets/SQL Plans 11g?

    What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
    The user has:
    ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
    The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
    Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
    If more information is needed in order to respond please advise.
    Thank you

    What permission are needed for a user to apply/activate sql tuning sets (sql plans) in 11g? The user can capture and move the the sql tuning sets from a 10g database to an 11g database but is getting "ORA-01031: insufficient privileges" when trying to activate/apply the sqlplans in 11g.
    The user has:
    ADMINISTER SQL MANAGEMENT OBJECT and ADMINISTER SQL TUNING SET and EXECUTE on SYS.DBMS_SPM
    The user is an administrator for our Data Warehouse team but they do not have sysdba priviliges.
    Do you also know of a good white paper that covers the step by step instructions and permissions needed for aquiring and applying/activating sqlplans?
    If more information is needed in order to respond please advise.
    Thank you

  • What is the less CPU intensive method ...

    Hi,
    With my Apple TV, I can select directly my music library from Apple TV's menu on my television set.  I can also choose from iTunes to stream to my Apple TV through AirPlay.  Does both method use my computer's CPU the same way ?  Is there a method that is less CPU intensive ?
    Regards.
    Robert Lespérance

    In terms of load on your system they are identical.
    The only difference is in the first scenario the AppleTV is pulling the content from the Mac (i.e. telling iTunes "give me this track/video/whatever) and in the second scenario the Mac is pushing the content to the AppleTV (i.e "here, AppleTV, display this video/audio/whatever stream").
    After the initial negotiation (push vs. pull) the load on the host system is identical - read the file off the disk and transmit it to the AppleTV for playback.

  • 10.5.7. why so CPU intensive on PBG412"?

    I just installed 10.5.7 on my PB G4. The CPU appears to be always maxed out, and as a result
    my brand new battery which lasted 4hrs under 10.4.11 suddently dropped to just over 1.5 hrs.
    Not to mention the computer is now hotter all the time.
    Is there a way to moderate the CPU usage of 10.5.7?
    Regards

    Alfonso wrote:
    I just installed 10.5.7 on my PB G4. The CPU appears to be always maxed out, and as a result
    my brand new battery which lasted 4hrs under 10.4.11 suddently dropped to just over 1.5 hrs.
    Not to mention the computer is now hotter all the time.
    Is there a way to moderate the CPU usage of 10.5.7?
    Regards
    If you just installed Leopard over Tiger, Spotlight will be indexing any and all volumes you have not excluded. This is an energy/CPU intensive process. See if the dot in the center of the spotlight magnifying glass is winkling. If so, it's still indexing.
    Run Activity Monitor and look at the top processes.
    Or run
    top
    in the terminal.

  • Urgt:How to identify TOP 5 SQL using more CPU time  without using statspack

    How to identify the TOP 5 SQL queries which are consuming more CPU time during the timespan of 24 hours for entire database. There are N number of users who have issued sql queries, out of which few users have disconnected and few user are still connected to the database(I need to consider all sessions). My database version is 9.0.1. I don't want to use statspack. Is there any way to identify TOP 5 SQL consuming more CPU time without affecting the performance of the database. Can any one help me on this? Its urgent!!. I don't want to use statspack becasue it degrades the performance and i cannot afford to run it for 24 hours.

    You don't run statspack for 24 hours, that would infact be pointless...
    Run statspack for say a 10 or 15 minute window during a particular "busy" period on your database. If you run it for longer then all the useful data will have been "averaged out". You want a snapshot in time, not an average over the day.

  • How to identify TOP 5 SQL consuming more CPU time without using statspack

    How to identify the TOP 5 SQL queries which are consuming more CPU time during the timespan of 24 hours for entire database. There are N number of users who have issued sql queries, out of which few users have disconnected and few user are still connected to the database(I need to consider all sessions). My database version is 9.0.1. I don't want to use statspack. Is there any way to identify TOP 5 SQL consuming more CPU time without affecting the performance of the database. Can any one help me on this? Its urgent!!.

    My database version is 9.0.1. I don't want
    to use statspack. Is there any way to identify TOP 5
    SQL consuming more CPU time without affecting the
    performance of the database. Can any one help me on
    this? Its urgent!!.I cant understand why you dont want to use statspack. As it is very easy to use and very quick to identify bottlenecks. Try using statspack. Its really wonderful.
    Particularly in your case statspack is the best.
    Regards,
    Sanju.

  • Which is more CPU intensive?

    Which is more CPU intensive, tracking to an audio track and looping that, or using Logic vitual midi instruments? Plug-ins and automation on audio tracks or Logic virtual midi instruments? Third party plug-ins like Waves or Izatope or Logic plug-ins

    A bit hard to answer, as you need to be a little more specific, but generally:
    tracking to an audio track and looping that, or using Logic vitual midi instruments?
    Depends on the instrument - Ultrabeat or Sculture can be pigs, for example, but generally recording audio tracks (lots of them) will tax your hard disk more than CPU.
    Plug-ins and automation on audio tracks or Logic virtual midi instruments
    Again, which plugins? Some hardly make a noticeable difference, others like Space Designer can get intense. Automation - very little.
    Third party plug-ins like Waves or Izatope
    Don't use Waves, but Izotope Ozone 3 is a real hog - but worth every bit of it - I love that plugin.

  • String intensive operations

    I need to do intensive operations on strings, mainly searching substrings and replacing text on that string.
    These strings i need to handle are about 4-8 thousand characteres lenght. What class do you recommend me to use?
    Thanks

    Like jschell said, if you know what you're doing, then you'd probably be best off using primitives and making your own optimized solution. If you're looking for something already out there, though, you'd be best off using StringBuffer if you'll be doing a lot of modification of the string. Otherwise, you'll just be creating a lot of instances of Strings that you don't need.

Maybe you are looking for