9.2.0.6 performs better if stats are deleted

I have this behaviour with 90% of queries where deleting the schema stats makes it perform the best in some cases improvement of 300%.
The query was written for 9.2.0.6 and we never had 8i.
I have modified the optimizer settings in init.ora but never got close to the way rule based performs. What could be causing this?
I can post the query with 3 scenarios if anyone wants to look.
Thanks

Check the explain plans for the queries with and without statistics, that will tell you what's causing the performance difference. You may end up having to re-work some of the queries if you plan on switching to the cost based optimizer. We have applications that have never used statistics, generating them degraded performance and they were deleted. Application area decided they did not want to spend the time to rework the queries, I guess they'll do it when rule based goes away.
Good luck.

Similar Messages

  • Performance degrades after stats collection

    Oracle 11gR2 OEL 5
    We have several very large tables (40 million rows and up) and recently we gathered stats on the tables and it degraded our performance. It started doing full table scans instead of using the indexes. The same queries are fine in other environments. Only difference is the stats gathering. Logically, the performance should be better after stats collection. But instead it is poor.
    I ran the 10053 trace on the query and I see that the cardinality and cost is way high in the poorly performing environment. As a test, I restored the old stats in the environment and it put everything back to normal - the query runs fast again. Note that the restored stats were gathered over a year ago. Should we not gather stats regularly on very large tables?
    Thanks.

    I will have to look more into the GATHER_STATS job.
    In the meantime, here is the query with both the good and bad explain plans.
    I'm sure you can see the difference in cost and cardinality
    Good (Original) Query Explain Plan
    SELECT  DL.LCODE , DL.CNUM , DR.DNAME , STPL.FSTE    
    FROM DL , DR_LK , DR ,  STPL    
    WHERE ( DL.LCODE = DR_LK.LCODE )
    AND ( DL.CNUM = DR_LK.CNUM )
    AND ( CCDT_LK.DBTR_ID = DR.DBTR_ID )
    AND ( DL.LCODE = STPL.LCODE )
    AND ( DL.CNUM = STPL.CNUM )
    AND ( ( DL.DT_ID = :dt_id )
    AND ( DL.DT_TPE = :dt_tpe )
    AND ( DR_LK.RLTP = '80' )
    AND ( STPL.IND = 'T' ) )
    ============
    Plan Table
    ============
    -----------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                        | Name                  | Rows  | Bytes | Cost  | Time      |
    -----------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                 |                       |       |       |    12 |           |
    | 1   |  NESTED LOOPS                    |                       |       |       |       |           |
    | 2   |   NESTED LOOPS                   |                       |   16K | 2210K |    12 |  00:00:01 |
    | 3   |    NESTED LOOPS                  |                       |     1 |   102 |     9 |  00:00:01 |
    | 4   |     NESTED LOOPS                 |                       |     1 |    65 |     7 |  00:00:01 |
    | 5   |      TABLE ACCESS BY INDEX ROWID | CDL                  |     1 |    32 |     4 |  00:00:01 |
    | 6   |       INDEX RANGE SCAN           | XI1_CDL             |     1 |       |     3 |  00:00:01 |
    | 7   |      TABLE ACCESS BY INDEX ROWID | CDR_LK              |     2 |    48 |     3 |  00:00:01 |
    | 8   |       INDEX RANGE SCAN           | PKEY_21               |     1 |       |     2 |  00:00:01 |
    | 9   |     TABLE ACCESS BY INDEX ROWID  | CDR                 |     1 |    21 |     2 |  00:00:01 |
    | 10  |      INDEX UNIQUE SCAN           | CDR_4398287791      |     1 |       |     1 |  00:00:01 |
    | 11  |    INDEX RANGE SCAN              | XIE1_C_PL         |     1 |       |     2 |  00:00:01 |
    | 12  |   TABLE ACCESS BY INDEX ROWID    | C_PL              | 2568K |   77M |     3 |  00:00:01 |
    -----------------------------------------------------------------+-----------------------------------+
    The bad (after gathering stats) Query Explain Plan
    ============
    Plan Table
    ============
    ------------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                         | Name                  | Rows  | Bytes | Cost  | Time      |
    ------------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                  |                       |       |       |   58K |           |
    | 1   |  NESTED LOOPS                     |                       |       |       |       |           |
    | 2   |   NESTED LOOPS                    |                       |   30G | 5864G |   58K |  00:10:17 |
    | 3   |    HASH JOIN                      |                       |   11K | 1253K |   16K |  00:03:06 |
    | 4   |     NESTED LOOPS                  |                       |       |       |       |           |
    | 5   |      NESTED LOOPS                 |                       |   11K |  890K |     7 |  00:00:01 |
    | 6   |       TABLE ACCESS BY INDEX ROWID | CL              |     1 |    42 |     4 |  00:00:01 |
    | 7   |        INDEX RANGE SCAN           | XI1_CL               |     1 |       |     3 |  00:00:01 |
    | 8   |       INDEX RANGE SCAN            | PKEY_31               |     1 |       |     2 |  00:00:01 |
    | 9   |      TABLE ACCESS BY INDEX ROWID  | C_LK              | 3432K |  115M |     3 |  00:00:01 |
    | 10  |     TABLE ACCESS FULL             | CDR                 | 3614K |  115M |   16K |  00:03:06 |
    | 11  |    INDEX RANGE SCAN               | XI1_C_PL         |     1 |       |     2 |  00:00:01 |
    | 12  |   TABLE ACCESS BY INDEX ROWID     | C_PL              | 3465K |   88M |     3 |  00:00:01 |
    ------------------------------------------------------------------+-----------------------------------+

  • How to improve performance of insert statement

    Hi all,
    How to improve performance of insert statement
    I am inserting 1lac records into table it takes around 20 min..
    Plz help.
    Thanx In Advance.

    I tried :
    SQL> create table test as select * from dba_objects;
    Table created.
    SQL> delete from test;
    3635 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    4
    SQL> insert /*+ APPEND */ into test select * from dba_objects;
    3635 rows created.
    SQL> commit;
    Commit complete.
    SQL> select count(*) from dba_extents where segment_name='TEST';
    COUNT(*)
    6
    Cheers, Bhupinder

  • Perform and Form statements

    Hello,
    can anyone give egs of using PERFORM and FORM statement. what do these statements do actually.
    thanks.

    See this sample for PERFORM ... USING...CHANGING
    DATA : c1 TYPE i, c2 TYPE i, res TYPE i.
    c1 = 1.
    c2 = 2.
    <b>PERFORM sum USING c1 c2 CHANGING res.</b>
    WRITE:/ res.
    **& Form sum
    ** text
    form sum using p_c1 p_c2 changing value(p_res).
    p_res = p_c1 + p_c2.
    endform. " sum
    Note the difference between the above and below perform.
    DATA : c1 TYPE i, c2 TYPE i, res TYPE i.
    c1 = 1.
    c2 = 2.
    <b>data: subroutinename(3) VALUE 'SUM'.
    PERFORM (subroutinename) IN PROGRAM Y_JJTEST1 USING c1 c2 CHANGING res</b>.
    WRITE:/ res.
    **& Form sum
    text
    form sum using p_c1 p_c2 changing value(p_res).
    p_res = p_c1 + p_c2.
    endform. " sum
    ANother sample for simple perform
    PERFORM HELP_ME.
    FORM HELP_ME.
    ENDFORM.
    <b>... TABLES itab1 itab2 ...</b>
    TYPES: BEGIN OF ITAB_TYPE,
             TEXT(50),
             NUMBER TYPE I,
           END OF ITAB_TYPE.
    DATA:  ITAB TYPE STANDARD TABLE OF ITAB_TYPE WITH
                     NON-UNIQUE DEFAULT KEY INITIAL SIZE 100,
           BEGIN OF ITAB_LINE,
             TEXT(50),
             NUMBER TYPE I,
           END OF ITAB_LINE,
           STRUC like T005T.
    PERFORM DISPLAY TABLES ITAB
                    USING  STRUC.
    FORM DISPLAY TABLES PAR_ITAB STRUCTURE ITAB_LINE
                 USING  PAR      like      T005T.
      DATA: LOC_COMPARE LIKE PAR_ITAB-TEXT.
      WRITE: / PAR-LAND1, PAR-LANDX.
      LOOP AT PAR_ITAB WHERE TEXT = LOC_COMPARE.
      ENDLOOP.
    ENDFORM.
    Hope this helps.
    Reward points if this helps u.

  • Does FCP perform better than adobe premiere elements on a MacBook Pro?

    does FCP perform better than adobe premiere elements on a MacBook Pro?
    Background:
    * just trying to decide what to go for re video editing app with more features than iMovie
    * last time I'd tried Adobe Premiere Elements on my MacBook (but it was before I had an SSD) the performance was not good - it was sluggish to the point I really didn't want to use it
    * so this question is just about whether in general FCP X performs better on a Mac (you'd think it would no, as it's made/optimized for a Mac)
    My MacBook:
    Processor  2.66 GHz Intel Core i7
    Memory  4 GB 1067 MHz DDR3

    Elements is essentially an amateur app and Premiere a professional one similar to the discontinued Final Cut Pro 7.
    FCP X is a radical new approach to editing which like Marmite, you either love or hate.
    It is probably between the 2 in capabitlity but much closer to Premiere.
    Some might say it was better than Premiere, whilst other long standing broadcast editors would disagree.
    It all depends on your standpoint and I am trying to give an unbiased appraisal.
    Some of the techniques it uses are way ahead of all other apps and this is what worries people who have an established way of working, though as I mentioned in another post, there are a few omissions which have upset those editors.
    Some might say (echoes of Jeremy Clarkson) that FCP X is the most advanced editing app on the planet albeit with a few teething troubles.

  • Macbook Air or MBP Which performs better

    I'm considering the 13" MBP 2.9Ghz with 8GB 700GB HD vs the 13 in Air 2.0GHz (256GB).  Besides the boot time being faster on the Air vs. the MBP is there other benchmarks available to compare these two models?  I saw 15 retina and air benchmarks but nothing comparing what performs better the air or 13 mbp.  Thanks.

    Most testing benchmarks don't adequately indicate the "real world" experience in regard to these two disparate setups. When the MBP is tasked to intensely execute a series of processor intensive tasks, such as video encoding or image manipulation, the MBP will "finish the race" much faster. The MBP has quad core, discrete graphics, and will be faster. It takes a measure of subjective "experience" testing to discern their real world differences, which will vary amongst users.
    The SSD in the Air will make the unit "seem" much more peppy than a HDD equipped MBP. When loading multiple files into memory, the SSD really shines. It makes apps launch faster, the boot faster, and the saving of files faster. Since most users are not repetitively performing tasks that require the raw processing power of the Pro model, many will just find the Air plain faster for them.
    Im sure arstechnica.com and anandtech.com will be doing straight-up comparisons really soon, as they have done on previous iterations of the Air and Pro. They both are very adept at discerning the usable differences beween both these lines.
    Of course, if you equip your Pro with an SSD, it will beat the Air in every way, except portability.

  • HT1430 I do a hard reset of my iPhone every so often because I feel it improves performance, but Apple states 'Reset ONLY if the device is not responding'. Forget about my OCD on this, but is their any reason my Apple stresses the ONLY DO THIS if not resp

    I do a hard reset of my iPhone every so often because I feel it improves performance, but Apple states 'Reset ONLY if the device is not responding'. Forget about my OCD on this, but is their any reason my Apple stresses the ONLY DO THIS if not responding?

    deggie wrote:
    Because it is more far-reaching than just turning the phone off and back on, it completely takes out anything in volatile memory, etc. I do reset mine if I notice problems such as no email coming in, text message issues, etc. but the same thing could probably be accomplished by just turning the phone off and on in your case.
    Thanks deggie, I think I get it now. Volatile memory (I had to look it up!) is memory that is lost on loss of power, so it's as you say... I'm not achieving anything on a normally functioning iPhone as on-off achieves the same result!... Thanks

  • AMD vs Core I7 - which performs better for Adobe Products?

    I'm currently running an AMD System (Phenom 2 x4 3.2Ghz, 8GB DDR3 PC10666, ATI 3870 512MB, Windows Ultimate 64bit, WD 120GB 10k RPM)
    and I'm wondering if it's worth purchasing and building a new, intel Core i7-920 system. I know the higher end, 970 would be better, but I don't feel like dropping $1k on a processor - so 920 is what I'm looking at.
    I would like to know (from users who have used, or are familiar with both platforms) which system performs better with the Adobe production suite and if it's worth the investment to switch from AMD to Intel. Does Hyper Threading affect the way AE / Premiere render? Will I notice a difference in speed from 8GB to 12/24GB for memory (for AE / Pr)?
    I would also like any suggestions on graphics cards (FireGL vs Quadro or GTX vs Radeon) to boost performance. I'm not much of a gamer and I would like to concentrate more of power on production. Right now I'm using a gaming card (an older one at that) and I would like to know if buying a newer one will boost performance for AE / Pr.
    Any help, tips, or suggestions would be great!
    Thanks,
    Drew

    I would recommend Intel processors over AMD for Adobe products.
    Does Hyper Threading affect the way AE / Premiere render?
    I can't talk for Premiere. For AE, it's perhaps marginal compared to the number of physical cores. And could be in some cases counter-productive if it tricks AE's multiprocessing system into believing there are twice as many cores, because of the way AE assigns RAM to the rendering instances it launches for each core (when "Render Multiple Frames Simultaneously" is enabled in Preferences).
    Will I notice a difference in speed from 8GB to 12/24GB for memory (for AE / Pr)?
    Yes, 8 GB is actually the absolute minimum you want for a quad core system (2 GB per core).
    After that, it depends on the content. For HD sized Comps, large source files and/or 32 bpc processing, having more RAM would lead to better performance and reliability.
    I would also like any suggestions on graphics cards (FireGL vs Quadro
    or GTX vs Radeon) to boost performance. I'm not much of a gamer and I
    would like to concentrate more of power on production.
    In AE, OpenGL previews are meant to provide a smoother/more responsive experience when interacting with the application. It won't help with render times in most cases. A medium to high end consumer level card should be fine. No need to sell the house for one of the pro level models. Keep an eye to the list of officially supported card/driver combinations.

  • Proving prepared statements are being reused

    How can I prove that a prepared statement from a JDBC driver is being reused / pooled ?
    What essentially I want to do is to have prepared statements reused to reduce hard parsing ... but I also need to prove that the statements are being reused. If I query the statement in V$SQLAREA, the column PARSE_CALLS does not seem to be distinguish between hard parse and soft parse:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch3204.htm#1126299
    I am only interested for now in proving the just ONE statement is being reused ... which mean that the number of hard parses is very low compared to the number of soft parses for that ONE statement.
    Regards,
    jms
    Message was edited by:
    jms

    Hi,
    No, parse calls is all soft and hard parse together. What you would see, if used absolutely correctly, would be 1 hard parse per session and many executions.
    But since v$sql is obviously not linked to v$session other than at the time of exection, you see the aggregated parse calls and executions for each cursor. So what you should see is parse calls go up relatively slowly to the number of exections.
    However, you can see soft and hard parses using the v$sesstat and v$statname views so you can see soft and hard parses on a session by session basis, be these are again aggregated, so you can't see soft / hard counts per cursor, only the total for a session.
    What I see a lot of the time is they don't get it quite right, so hard parses is low but soft parses are high, so they are still parsing when they don't need to, but at least they are binding and using shareable SQL, which is a step in the right direction.
    When I say 'they', it is a generic reference to all Java/.Nyet programmers writing front end code where they just don't 'get' parsing and binding because it's just too complicated and hey, SQL Server isn't like this...!
    HTH
    Chris

  • HT4059 Being new to iBook publishing I need to know if stats are available to determine how many times my iBook has been downloaded. Can anyone help please? Mr Ignorant

    Being new to iBook publishing I need to know if stats are available to determine how many times my iBook has been downloaded. Can anyone help please? I need to persuade someone that this really is worthwhile. Mr Ignorant.

    The only people who can possibly assist you with this is Apple Customer Relations, call your local Apple contact number and ask for Customer Relations then explain your situation clearly and politely (be firm but don't rant).
    You might want to investiage what the local laws are regarding defective goods and 'fit for use' definitions on warranties etc. Consumer Protection can be a useful tool to use or bargain with if needed ...

  • Which two statements are true about WHERE and HAVING clause ?

    Which two statements are true about WHERE and HAVING clause ?
    1. WHERE clause can be used to restict rows only
    2.HAVING clause can be used to restrict groups only
    3.HAVING clause can be used to restrict groups and rows
    Plz help me in dis ques...which two will be correct...i think its 1 and 2...but not sure.

    863180 wrote:
    Plz help me in dis ques...which two will be correct...i think its 1 and 2...but not sure.If you are not sure then you do not fully understand HAVING.
    SY.

  • The photos that I better (improves automatic) are saved on the iphone, but when I transfer them to my PC improvements appear no more, only on iphone. I do not understand why the improvements are just the iphone, and not continue when I transfer the photos

    The photos that I better (improves automatic) are saved on the iphone, but when I transfer them to my PC improvements appear no more, only on iphone. I do not understand why the improvements are just the iphone, and not continue when I transfer the photos to my PC.
    Thanks.

    Chicky, I have searched my computer for "iPod Photo Cache" and 51 folders pop up, plus 3 files (iPodInfo.plist, Photo Database and Image DB Temp.tmp). How do I know which to delete and which to keep? The Apple website page tackling this issue doesn't go into any detail. Thanks yet again.

  • Script to know how many statements are not loaded in oracle CM

    Hi,
    Can some one would help me on how to prepare a script to know the bank statements are not loaded into oracle CM and how many checks under that particular statement are not loaded??
    I have the following info with me..
    1. The statements are loaded in a temporary table as soon as we run statement loader program.
    2. Then the records will get into ce_statement_headers_int_all and ce_statement_lines_interface.
    3. Then they will get loaded into ce_statement_headers_all and ce_statement_lines tables.
    Now, the only thing i am confused is how to get to know the statements list that are not loaded into oracle along with the error message. i am confused which tables will give the exact info ce_statement_headers_int_all and ce_statement_lines_interface or ce_headers_interface_errors and ce_lines_interface_errors??? immediate help would be highly appreciated and its very urgent...........
    Thanks.

    Hi Helios,
    I dint get you. This is not something which SR can be raised. I need to know how script can be written to know the statements that are not loaded in oracle cash management. I need to prepare a notification where in that should contain how many statements have been loaded successfully and how many are not on a daily basis...
    Thanks.

  • I listen to a lot of live performances (house sets that are from 1 hour to 3 hours long) when I start to listen to a set and then stop to do something else on the iPhone when I go back to start to listen to the track it has started from the beginning.

    I listen to a lot of live performances (house sets that are from 1 hour to 3 hours long) when I start to listen to a set and then stop to do something else on the iPhone when I go back to start to listen to the track it has started from the beginning.

    It sounds like either your hard drive or the SATA cable that connects it to the motherboard are failing. This could be heat related in your case, which is why you see it after it runs awhile. You can take it to the Genius Bar for a free evaluation. If you decide to test it yourself, I usually suggest moving the hard drive to an external enclosure. If it works there for awhile, the cable is probably the issue.
    http://www.amazon.com/Sabrent-2-5-Inch-Aluminum-Enclosure-EC-TB4P/dp/B005EIGUD4/ ref=sr_1_3?ie=UTF8&qid=1397647657&sr=8-3&keywords=2.5+enclosure
    http://www.ifixit.com/Device/MacBook_Pro_13%22_Unibody_Mid_2009

  • Golden Gate - DML statements are not replicated to target database

    Hi,
    Testing Environment
    Source:
    OS: RHEL 4.6, Database: 11gR2, Golden Gate 10.4, ASM
    extract ext1
    connection to database
    userid ggate, password qwerty
    hostname and port for trail
    rmthost win2003, mgrport 7800
    path and name for trial
    rmttrail C:\app\admin\GOLDENGATE\dirdat\lt
    EXTTRAIL /u01/oracle/goldengate/dirdat/lt
    --TRANLOGOPTIONS ASMUSER SYS@ASM, ASMPASSWORD sys ALTARCHIVELOGDEST /u03/app/arch/ORCL/archivelog
    --DDL support
    ddl include mapped objname sender.*;
    --DML
    table sender.*;
    Target:
    OS: Windows 2003, Database: 11gR2, Golden Gate 10.4
    --replicate group
    replicat rep1
    --source and target defintions
    ASSUMETARGETDEFS
    --target database login
    userid ggate, password ggate
    --file for discared transaction
    discardfile C:\app\admin\GOLDENGATE\discard\rep1_disc.txt, append, megabytes 10
    --ddl support
    DDL
    --specifying table mapping
    map sender.* ,target receiver.* ;
    I've Successfully setup Oracle Golden Gate test environment as above.
    DDL statements are replicating successfully to target database.
    while DML statements are not being replicated to target database.
    Pl. try to solve the problem
    Regards,
    Edited by: Vihang Astik on Jul 2, 2010 2:33 PM

    Almost ok but how you will handle the overlapping (transactions captured by expdp & captured by Extract too) of transactions for the new table ?
    Metalink doc ID 1332674.1 has the complete steps. Follow the "without HANDLECOLLISIONS" approach.

Maybe you are looking for

  • Trouble installing/using SQL Developer on Windows 2008 R2

    I need help installing sql developer. I am running Windows 2008 R2. I tried installing the 64 bit version, and when it asked for the path to the JDK, it complains that it doesn't exists. Can someone PLEASE point me to which JDK I need to install? I t

  • Cant scroll on Samsung Series 9 with Synaptics V8.0 Clickpad

    Here's the deal: Bougth an used Samsung NP900X3A-A01PT (http://www.samsung.com/pt/consumer/monitor-peripherals-printer/notebook/notebook/NP900X3A-A01PT-spec). It worked just fine (scrolled just fine on Firefox once I installed it), but since I wanned

  • Executing a SQL Command in my bean class

    Hello everyone, I'm using JDeveloper 12.1.2.0.0. I have an interest in executing a query in my bean method. I've done some research and i still got a code but it can't find the method that the method requires so i tried to added the query in my AppMo

  • FRM-92100 Java Exception (jacob)

    I'm using Jacob to load specific parts of Office documents into an Oracle database. This works successfully in 99.9% of cases although some users experience intermittent problems which can't be pinned down to a particilar office document and appear t

  • Keywording several images

    Hi I like to put a keyword on several images at once. How do I manage this? - When I select a couple of images and use the keywordhud to drag a keyword ower to my images there is only put a keyword on the image I hit. And if I select a couple of imag