SQL Tuning "read-consistency Issue.

Hello

Oracle 9.2 we Dim 5.10

I have a problem with the query below.
SELECT INDV_ID
FROM
 INDV WHERE SSN = :B1


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute    121      0.16       0.09          0          0          0           0
Fetch      121    327.52     320.00    1446367    1892864          0           2
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total      243    327.68     320.10    1446367    1892864          0           2

Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 42  (CORE)   (recursive depth: 1)

Rows     Execution Plan
-------  ---------------------------------------------------
      0  SELECT STATEMENT   GOAL: CHOOSE
      0   TABLE ACCESS   GOAL: ANALYZED (BY INDEX ROWID) OF 'INDV'
      0    INDEX   GOAL: ANALYZED (RANGE SCAN) OF 'INDV_IDX1' (NON-UNIQUE)



Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file sequential read                     97091        0.02          4.85
  db file scattered read                     270729        0.01         40.49
********************************************************************************
The above query is part of a release of tkprof with sql trace level 8. A simple query with a good explain plan and if I run the query each it doesn't take any time. But the work takes 12 hours to complete with most of the time showing the query above as the "current state". The query above should run appx 16000 times in the work. The above output is a record which lasted only 15-20 min. If we see the value of the query and disk above, the value is too high from the table and he ranks should not change very often (I won't say static though).

I would be very grateful if someone can explain the behavior of query above.

Thank you
Ankit.

It looks like SQL from a pl/sql procedure.
"Implementation Plan" is almost certainly wrong, and you do a comprehensive analysis or full index.
It is likely that you have a type mismatch that is the problem.

Option 1) your SSN is a character column, the pl/sql variable is of a different type - perhaps a number.
Option 2) for some reason, you have a defined character offset - SSN is perhaps a varchar2 and the incoming pl/sql variable is a 'nvarchar' or similar, probably because of character set used on the client.

Since you have the tkprof output and it comes to 9i, then you might look at the trace file to find the text of this statement and check the line where it says: «Parsing in cursor...» ", this will be an entry hv = NNNNN.

To see the offender for the instruction memory:

select
        operation, options, object_name
from    v$sql_plan
where
        hash_value = {your value for NNNNN}
order by
        child_number, id
;

Next step - look for the pl/sql with this SQL and check the type of variable.

Concerning
Jonathan Lewis
http://jonathanlewis.WordPress.com
http://www.jlcomp.demon.co.UK

"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking.

Tags: Database

Similar Questions

  • SQL Tuning Advisor on a select Question

    Hi all.
    10.2.0.4 RAC
    I have a select sequential reading of file db high. I used sql tuning advisor on OEM, and the Adviser show me these recommendations:
    RECOMMENDATIONS
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    GENERAL INFORMATION SECTION
    -------------------------------------------------------------------------------
    Tuning Task Name                  : SQL_TUNING_1266335308111
    Tuning Task Owner                 : SYSTEM
    Scope                             : COMPREHENSIVE
    Time Limit(seconds)               : 1800
    Completion Status                 : COMPLETED
    Started at                        : 02/16/2010 16:48:44
    Completed at                      : 02/16/2010 16:50:06
    Number of SQL Profile Findings    : 1
    
    -------------------------------------------------------------------------------
    Schema Name: CRM
    SQL ID     : b7cd8jntqpcgu
    SQL Text   : select * from ( select this_.ENVIO_ID as ENVIO1_33_0_,
                 this_.NOMCLIENTE as NOMCLIENTE33_0_, this_.NOMCONTACTO as
                 NOMCONTA3_33_0_, this_.APLICACION_ID as APLICACION4_33_0_,
                 this_.PRIORIDAD as PRIORIDAD33_0_, this_.MEDIO as MEDIO33_0_,
                 this_.MEDIO_VALOR as MEDIO7_33_0_, this_.ESTADO as ESTADO33_0_,
                 this_.ESTADO_DESC as ESTADO9_33_0_, this_.FEC_PREVISTA as
                 FEC10_33_0_, this_.FECHA_ENVIO as FECHA11_33_0_,
                 this_.REC_CLIENTE as REC12_33_0_, this_.FECHACREA as
                 FECHACREA33_0_, this_.FECHAMODIF as FECHAMODIF33_0_,
                 this_.FLAGBLOQUEO as FLAGBLO15_33_0_, this_.FLAGBORRADO as
                 FLAGBOR16_33_0_, this_.COMENTARIOS as COMENTA17_33_0_,
                 this_.HORAENVIO as HORAENVIO33_0_, this_.EMISOR as EMISOR33_0_,
                 this_.IDENTIFICADOR as IDENTIF20_33_0_, this_.MEDIO_VALOR_DESC
                 as MEDIO21_33_0_, this_.DEBUG_TRACE as DEBUG22_33_0_,
                 this_.FORMULARIO_ID as FORMULARIO23_33_0_, this_.CAMPANYA_ID as
                 CAMPANYA24_33_0_, this_.CONTACTO_ID as CONTACTO25_33_0_,
                 this_.USUARIOCREA as USUARIO26_33_0_, this_.USUARIOMODIF as
                 USUARIO27_33_0_, this_.CLIENTE_ID as CLIENTE28_33_0_,
                 this_.CAMPPOS_ID as CAMPPOS29_33_0_, this_.ACTIVIDAD_ID as
                 ACTIVIDAD30_33_0_, this_.TAGCLICONEXT_ID as TAGCLIC31_33_0_ from
                 CRM.CRM_ENVIOS this_ where this_.MEDIO=:1 and this_.ESTADO=:2
                 and this_.FECHA_ENVIO<=:3 order by this_.ENVIO_ID asc ) where
                 rownum <= :4
    
    -------------------------------------------------------------------------------
    FINDINGS SECTION (1 finding)
    -------------------------------------------------------------------------------
    
    1- SQL Profile Finding (see explain plans section below)
    --------------------------------------------------------
      A potentially better execution plan was found for this statement.
    
      Recommendation (estimated benefit: 99.43%)
      ------------------------------------------
      - Consider accepting the recommended SQL profile.
        execute dbms_sqltune.accept_sql_profile(task_name =>
                'SQL_TUNING_1266335308111', replace => TRUE);
    
    -------------------------------------------------------------------------------
    ADDITIONAL INFORMATION SECTION
    -------------------------------------------------------------------------------
    - The optimizer could not merge the view at line ID 2 of the execution plan.
      The optimizer cannot merge a view that contains an "ORDER BY" clause unless
      the statement is a "DELETE" or an "UPDATE" and the parent query is the top
      most query in the statement.
    
    -------------------------------------------------------------------------------
    EXPLAIN PLANS SECTION
    -------------------------------------------------------------------------------
    
    1- Original With Adjusted Cost
    ------------------------------
    Plan hash value: 3505713201
    
    ----------------------------------------------------------------------------------------------
    | Id  | Operation                     | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT              |              |     1 |  4416 |   604K  (1)| 02:00:53 |
    |*  1 |  COUNT STOPKEY                |              |       |       |            |          |
    |   2 |   VIEW                        |              |     1 |  4416 |   604K  (1)| 02:00:53 |
    |*  3 |    TABLE ACCESS BY INDEX ROWID| CRM_ENVIOS   |     1 |   352 |   604K  (1)| 02:00:53 |
    |   4 |     INDEX FULL SCAN           | SYS_C0020438 |  2718K|       |  8153   (1)| 00:01:38 |
    ----------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<=:4)
       3 - filter("THIS_"."MEDIO"=:1 AND "THIS_"."ESTADO"=:2 AND
                  "THIS_"."FECHA_ENVIO"<=:3)
    
    2- Using SQL Profile
    --------------------
    Plan hash value: 3391889105
    
    ------------------------------------------------------------------------------------------------------
    | Id  | Operation                      | Name                | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT               |                     |     1 |  4416 |  3431   (1)| 00:00:42 |
    |*  1 |  COUNT STOPKEY                 |                     |       |       |            |          |
    |   2 |   VIEW                         |                     |     1 |  4416 |  3431   (1)| 00:00:42 |
    |*  3 |    SORT ORDER BY STOPKEY       |                     |     1 |   352 |  3431   (1)| 00:00:42 |
    |*  4 |     TABLE ACCESS BY INDEX ROWID| CRM_ENVIOS          |     1 |   352 |  3430   (1)| 00:00:42 |
    |*  5 |      INDEX SKIP SCAN           | APLICACIONENVIO_IDX |     1 |       |  3429   (1)| 00:00:42 |
    ------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<=:4)
       3 - filter(ROWNUM<=:4)
       4 - filter("THIS_"."MEDIO"=:1 AND "THIS_"."FECHA_ENVIO"<=:3)
       5 - access("THIS_"."ESTADO"=:2)
           filter("THIS_"."ESTADO"=:2)
    
    -------------------------------------------------------------------------------
    I think the main problem is the order, but when I run autotrace traceonly without order by the plan of the explain command is diferent to advise:
    SELECT *
      2    FROM (SELECT this_.envio_id AS envio1_33_0_,
      3                 this_.nomcliente AS nomcliente33_0_,
      4                 this_.nomcontacto AS nomconta3_33_0_,
      5                 this_.aplicacion_id AS aplicacion4_33_0_,
      6                 this_.prioridad AS prioridad33_0_, this_.medio AS medio33_0_,
      7                 this_.medio_valor AS medio7_33_0_, this_.estado AS estado33_0_,
      8                 this_.estado_desc AS estado9_33_0_,
      9                 this_.fec_prevista AS fec10_33_0_,
     10                 this_.fecha_envio AS fecha11_33_0_,
     11                 this_.rec_cliente AS rec12_33_0_,
     12                 this_.fechacrea AS fechacrea33_0_,
     13                 this_.fechamodif AS fechamodif33_0_,
     14                 this_.flagbloqueo AS flagblo15_33_0_,
     15                 this_.flagborrado AS flagbor16_33_0_,
     16                 this_.comentarios AS comenta17_33_0_,
     17                 this_.horaenvio AS horaenvio33_0_, this_.emisor AS emisor33_0_,
     18                 this_.identificador AS identif20_33_0_,
     19                 this_.medio_valor_desc AS medio21_33_0_,
     20                 this_.debug_trace AS debug22_33_0_,
     21                 this_.formulario_id AS formulario23_33_0_,
     22                 this_.campanya_id AS campanya24_33_0_,
     23                 this_.contacto_id AS contacto25_33_0_,
     24                 this_.usuariocrea AS usuario26_33_0_,
     25                 this_.usuariomodif AS usuario27_33_0_,
     26                 this_.cliente_id AS cliente28_33_0_,
     27                 this_.camppos_id AS camppos29_33_0_,
     28                 this_.actividad_id AS actividad30_33_0_,
     29                 this_.tagcliconext_id AS tagclic31_33_0_
     30            FROM crm.crm_envios this_
     31               where this_.estado = 'Enviado'
     32           and this_.medio = 3482 AND this_.fecha_envio <= '02/04/10 00:00:00')
     33   WHERE ROWNUM <= 500;
    
    no rows selected
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1577868436
    
    ------------------------------------------------------------------------------------------------
    | Id  | Operation                    | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT             |                 |   500 |   171K|  2425   (1)| 00:00:30 |
    |*  1 |  COUNT STOPKEY               |                 |       |       |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| CRM_ENVIOS      |   500 |   171K|  2425   (1)| 00:00:30 |
    |*  3 |    INDEX RANGE SCAN          | ESTADOENVIO_IDX |       |       |   104   (0)| 00:00:02 |
    ------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - filter(ROWNUM<=500)
       2 - filter(TO_NUMBER("THIS_"."MEDIO")=3482 AND "THIS_"."FECHA_ENVIO"<='02/04/10
                  00:00:00')
       3 - access("THIS_"."ESTADO"='Enviado')
    
    
    Statistics
    ----------------------------------------------------------
              1  recursive calls
              0  db block gets
         138277  consistent gets
          45240  physical reads
              0  redo size
           2629  bytes sent via SQL*Net to client
            488  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              0  rows processed
    I was looking for a way to see who wear's Advisor using his plan, but didn't see a way of knowing on docs, or at least I have not found it.
    Can someone show me that some light on what changes made Advisor to select to reach that way, or how can I watch this that select uses?
    Any help will be appreciate
    Thank you

    The Adviser does not create a new SQL statement - what it has done is create a SQL profile - to accept SQL profile for the task of tuning above:

        execute dbms_sqltune.accept_sql_profile(task_name =>
                'SQL_TUNING_1266335308111', replace => TRUE);
    

    as mentioned in the above report...

    A sql profile applys tips for change (correct) the cost of certain operations - and, to change the execution path chosen by the optiimizer.

  • That means 1z0-117 oracle 11g sql tuning now say it includes v12 addition v11

    Hello

    I did the 1z0-117 sql tuning review once.

    Not too far away.

    I studied under and turned off for a while.

    I anticipate taking in 1 month.

    However, I just noticed that the oracle site says 1z0-117 also said that v12 is also included for consideration:

    Oracle 11g sql tuning.

    It makes no sense at all.

    Roger

    However, I just noticed that the oracle site says 1z0-117 also said that v12 is also included for consideration:

    Oracle 11g sql tuning.

    Unless you are looking for something I'm not, what actually is the 1Z0-117 page says: "validated against: review has been validated against Oracle Database 11g Release 2 version 11.2.0.1.0 and database Oracle 12 c 12.1.0.1.0"

    What they actually mean by it is that someone went through all the issues and and asked the question "is still a relevant issue for the release of 12 c to Oracle?'." "  If they find issues that are not valid because of an update/change, then the question will be removed from review (or changed) so that someone who has used 12 c but not 11 g will not at a disadvantage.

    This is * No * means that Oracle has added questions to the review of the capabilities that were introduced in version 12 c.

  • Need your help for sql tuning


    Hi gurus

    I really want to learn a few basics against SQL tuning, can you please guide me how will I achieve my goal? Thanks in advance.

    Concerning

    Shu

    I am professional tuner and this for 20 years. Firstly, I think that the best way is always a course with instructor. In other words, you can't ask for books. You have no need to read tuning guide in this case, the instructor he will tell you. If the time and the budget does not allow you a course, you can go online or material and DVD tutorial. As a next steop I would recommend Cary Milsap's "Optimizing Oracle Perforamance". I'll be your right mind game. Jonathan and Chris books you must have if you do practical work. You don't need to read all the chapters in detail from the beginning, but you should check out them if you have any questions when you work on a tuning tasks. If you want to go more advanced subjects discover Wolfgang Breitlings presentation on http://www.centrexcc.com/. Very valuable are also Throw away method of Martin Berg and the SQL Diagraming of Daniel Tow technique.

  • Book for the 1Z0-117 new '11 g SQL Tuning 2'? No mutual FUNDS still available.

    Since 1Z0-117 '11 GR 2 SQL Tuning"is a new review on beta yet, with the exception of Mathew Morris summary is a full review as OPC Oracle Experts corrected reference Guide?

    Is the + "* press of Oracle Database 11g Release 2 Performance Tuning Tips & Techniques *" + sufficient?

    Or I can just look at the topics covered and study them and other resources?

    Thank you

    There is no other specific book tested beyond my guide out yet. Press review of the Oracle that you mention is more adjustment than the setup of SQL server. My site has a bunch of links to articles on the web for relevant topics:

    http://www.oraclecertificationprep.com/Apex/f?p=OCPSG:EXAM_DETAILS:0:no:P2_EXAM:1Z0 - 117

    There is also links to two books, Oracle 11 g R2 database: SQL Tuning and Pro SQL from Oracle. I have not read either, but they were the only books that I could find which seem to cover a reasonable number of subjects ranging from the review.

    The site also contains links to the documentation of oracle, including Performance Tuning Guide VLDB and partitioning Guideand Data Warehousing Guide - which contain significant amounts of the material under test.

  • 1Z0-117: Oracle Certified Expert, Oracle Database 11 g Release 2 SQL Tuning

    Hello

    I failed the exam 1Z0-047 Oracle database SQL Expert"x 3 and will pass the exam in January 2012. I'm sure I'll spend this time :-) to 95%

    Now my question: what's next 1Z0-047? I only know how to leave 1Z0-047. I am SQL scripts to my work, but no DBA work and not of PL/SQL. So I guess that the "Oracle Certified Expert, Oracle Database 11 g Release 2 SQL Tuning" would be the next logical step?

    Is 'Oracle Certified Expert, Oracle Database 11g Release 2 SQL Tuning' too complicated for me (only have knowledge of the exam 1Z0-047). Because I don't have experience with the topics listed in the objectives, for the most part never heard talk about.

    What study guide?

    So I guess that the "Oracle Certified Expert, Oracle Database 11 g Release 2 SQL Tuning" would be the next logical step?

    I agree with you.

    The Oracle 11 g Release 2 database: review SQL Tuning is still in beta at least until November 24, 2012. Beta versions have been known to be extended. Even if this isn't the case, the examination of the production is not available before mid-January 2013 about. I had one experience with a beta. I hated and will never be another. There is little reason to do so, and most importantly (reduced cost) is not important to me because my company reimburses the cost of my essay, so I don't really care about the savings. They take several times longer to complete and I was a mess at the time that I finished that I did with a headache roaring through a large part of the review.

    That said - answering your question:

    1Z0-047 is a really complicated test. The questions and answers are designed to mislead. There is a reason for that. SQL, by its very nature, is a fairly simple language. Part of its appeal, is that it is easy to understand and write. If the people who wrote the essay was not gone to their best to make the deliberately convoluted SQL code, then it would not have required skills 'experts' to pass. It is much more difficult to read and diagnose poorly written SQL as well written SQL.

    I also took the test Application Express Expert: 1Z0-450. The questions that it were not written in a deliberately confusing manner. However, they had need intimate knowledge of the interface of the Apex. Because it was possible to write questions 'hard' without having to make them deliberately more obscure, the questions were simpler. I did not review SQL Tuning (as I said... no more betas for me), but I suspect that it will be similar to 1Z0-450 has enough information "at the level of experts" to write questions on that test will not attempt to write "hard" questions

    Is 'Oracle Certified Expert, Oracle Database 11g Release 2 SQL Tuning' too complicated for me.
    Because I don't have experience with the topics listed in the objectives, for the most part never heard talk about.

    Not sure what is in the test. This is excellent news. Student for the test will teach you a lot of new things about writing and tuning SQL. In my posts, a concept is repeated again and again. The value of certification is not make a piece of paper to stick in a workbook. The value comes to what new skills you gain in is about to pass the test. If you do not know the information and that you are not studying for the test, Yes, you will not pass. If you prepare for the test until you do understand the objectives, then you should be able to pass the test.

    What study guide?

    None does not yet exist. There is no doubt that I will write a review study guide. It won't be until some time after the test is in production. I do not publish guides for which I hold the certification. Do not wait for good. You can use the same exact source, I will use in his creation - the Oracle documentation. I guarantee you that all topics on the unique OE page and every single question that is under review are answered somewhere in the documentation.

  • Noob in SQL Tuning seeking help

    I am learning SQL Tuning and operation of it. I know that the first step is probably explain the sql statement execution plan? My problem is that I do not understand what am I suppose to collect from the execution plan.
    SQL> set autotrace traceonly explain
    SQL> select * from employees A
         where A.last_employed =
         ( SELECT TO_CHAR(MAX(TO_DATE(PAY_DATE,'MMRR')),'MMYY')
           FROM PAYROLL_VW1 B
           WHERE B.SSN = A.SSN AND B.PAY_TYPE_CODE IN ('02','12','22','32')
          AND STATUS = 'ACTIVE' AND A.BRANCH=B.BRANCH
         );
    Execution Plan
    ----------------------------------------------------------
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=47427 Card=1 Bytes
              =180)
    
       1    0   FILTER
       2    1     TABLE ACCESS (FULL) OF 'EMPLOYEES' (TABLE) (Cost=1618 Card
              =297964 Bytes=53633520)
    
       3    1     SORT (AGGREGATE)
       4    3       VIEW OF 'PAYROLL_VW1' (VIEW) (Cost=2290 Card=2 Bytes=
              46)
    
       5    4         SORT (UNIQUE) (Cost=2290 Card=2 Bytes=217)
       6    5           UNION-ALL
       7    6             FILTER
       8    7               TABLE ACCESS (FULL) OF 'PAYROLL2012' (TABLE) (C
              ost=2284 Card=1 Bytes=105)
    
       9    6             FILTER
      10    9               TABLE ACCESS (BY INDEX ROWID) OF 'PAYROLL2011'
              (TABLE) (Cost=4 Card=1 Bytes=112)
    
      11   10                 INDEX (RANGE SCAN) OF 'PAYROLL2011_IDX1' (IND
              EX) (Cost=3 Card=29)
    Then what should I do with the execution plan? What else should I check on it? How to grant the request?

    Edited by: apex_disco may 1, 2012 05:57

    I don't know how the licenses work. There is a difference between EM and Grid Control. I think that if you have just one instance, Enterprise Manager is installed, and if nothing is free I think it would be. Now, how much diagnosis is free? Who knows.

    But it may not be important. If you simply play "learning SQL Tuning" say, at home on a Linux machine, you can install anything you want and play with him.

    If adding an accelerated things index (in your re-written query logic now) then you must have had a considerable amount of documents in one of these tables not indexed. If you look at the plan to explain it now, it will probably show the indexes used, fewer files searched, less costly, etc as the other plan.

    But maybe I missed your point of departure. You want to learn how to set up queries in general or you try to resolve this particular application? I took the first for my previous answers.

    As for your results, your statistics say at least high level info. Becomes coherent and physical readings went down WAY.

    Initial statistics
    ----------------------------------------------------------
    0 recursive calls
    0 db block Gets
    1172490142 compatible Gets
    4914 physical reads
    Redo 191496 size

    2340 bytes sent via SQL * Net to client
    329 bytes received via SQL * Net from client
    1 SQL * Net back and forth to and from the client
    115881 sorts (memory)
    0 sorts (disk)
    0 rows processed

    on these tables and below are my stats. I think this is a major improvement. Elapsed time was reduced significantly to 00:00:00.65

    To listen statistics
    ----------------------------------------------------------
    352 recursive calls
    0 db block Gets
    31498 compatible Gets
    1101 physical reads
    0 redo size

    2340 bytes sent via SQL * Net to client
    329 bytes received via SQL * Net from client
    1 SQL * Net back and forth to and from the client
    13 sorts (memory)
    0 sorts (disk)
    0 rows processed

    Published by: gaffe on May 1, 2012 13:18

  • Hi friends someone explain what that is SQL tuning

    What is SQL tuning

    Also, read this Book:

    http://www.Amazon.com/SQL-Tuning-Dan-tow/DP/0596005733

    concerning

  • Reading consistent (Datablock and SNA)

    Hi experts,

    When a SELECT statement is issued, SCN of the select query is determined. Then the blocks with higher YVERT are reconstructed from the RBS structure... is what I know uptill this point

    Now as I'm user01 according to the consistency of reading for the user model:

    I had an employee table in my database. I pulled a SNA update query (1005) and updated two blocks. So now view data
    I pulled a query select (YVERT is 1010) and all the blocks that are less then it will be then displayed for me blocks all present and updated data will be displayed.

    Now user02 started a session and he pulled a select statement on the same table and SNA was 1012
    One more time all the blocks with YVERT less then 1012 will appear so he will also receive an update of data? that is not possible because I have not committed my data...

    How to read the maintenance of uniformity?
    So, how does this work?

    Second thing my executed query: select query will make me blocks of database... How to select query will come from knowledge that this block is engaged or uncommittted?

    The thing is when I fire the select query is good that first it checks n difference YVERT and then it will check for the block if its committed or not? am I wrong?

    When I commit the commit THAT SNA will be updated to the data file and the control file that is recorded in the Redo Log?

    Thank you
    Philippe

    Kamy wrote:

    I spotted the answer what I wanteds.got my eaxact response in the book of concepts oracle 11.2 on page 181 para says:

    * Read consistency and Transaction tables the database also uses an operating table,
    calls a list of self-dealing (ITL), to determine if a transaction has been
    uncommitted when the database has begun to change the block. The header block of
    each block segment contains a transaction table.*

    But Sir, I had a doubt this operation and ITL table the two are from different tables?

    You have reason to doubt.
    For people who have known these things for a long time, the "operating table" is the name given to the structure in a segment undo header block to contain a list of recent transactions that have used this undo segment to store their files of cancellation.

    The 'list of self-dealing' is the name given to a structure that exists in each normal block of data (including the index) to contain a list of recent transactions that have modified this block. It was very stupid of the author of this page to decide to reuse the name of a structure as an alias for the other.

    Concerning
    Jonathan Lewis

  • SQL Tuning sets and SQL Tuning Advisor.

    Hello

    We run oracle11g r2 where under win server 2008 R2.

    How can I find out when Tuning SQL and SQL Tuning games advisors are enabled in my database.

    Is Oracle11g has default setting YES for this tuning packs

    Thank you

    It seems you found somone activated of sets and the setting of advisers.  as others have said, theyre part of the D & T and theyre always there but only, you become eligible for a permit after that you use.   This will tell you the first time they have been used if at all, the key here for you field be FIRST_USAGE_DATE that must be completed only if detected_usages > 0

    fixed lines 180

    Col name format a30

    SELECT name, version, detected_usages, FIRST_USAGE_DATE, last_usage_date

    of DBA_FEATURE_USAGE_STATISTICS

    where upper (NAME) like '% % TUNING '.

  • Wonder if I do 1z0-064 12 c perf and tuning instead of 11 g sql tuning?

    Hello

    Wonder if I do 1z0-064 12 c perf and tuning instead of 11 g sql tuning?

    I spent so much time studying from 11 g sql tuning.

    Basically, I used the book of oracle for it certification preparation.

    I don't have the funds that I used to.

    All thoughts.

    I guess there is a lot of overlap between 1z0 - 117 and 1z0 - 064.

    I wonder if Oracle will never provide 20% discount for 12 c perf and tuning.

    Did anyone will ever write a certification for this book.

    Thank you Roger

    user6862024 wrote:

    Wonder if I do 1z0-064 12 c perf and tuning instead of 11 g sql tuning?

    I wonder if Oracle will never provide 20% discount for 12 c perf and tuning.

    Oracle gives RARELY given to reviews.  They can provide a discount on a package bundled (say buy a certification exam voucher and they will dismiss a practical review of 1 of 2 certified vendors: Self Kaplan or transcend.).

    user6862024 wrote:

    Did anyone will ever write a certification for this book.

    Well, the main author who is not written of Oracle Press books, is Matthew Morris who wrote study guides specifically for the Oracle Certification exams.

    His site is here--> Prep of Oracle Certification

    And there you will see that a link for any study of his guide at the top right.

    And it also provides links to study materials to review you're looking for.  --> Oracle Certification Prep: details of the examination and resources in preparation for 1Z0 - 064

    Currently, it is NOT a guide for exam 1Z0-064, but it may be trying to write a.  I don't know that Matthew will respond as it usually check this subforum.

  • Need to learn the code of PL/SQL tuning

    Hi all

    I already asked this question earlier, but the link provided was too difficult to understand, I really grateful if someone suggest me the good and simple link or presentation for mentioned topic question.

    In addition, I just want to learn some basic for this. Appreciate your response. Thank you

    Concerning

    Muzz

    I already asked this question earlier, but the link provided was too difficult to understand, I really grateful if someone suggest me the good and simple link or presentation for mentioned topic question.

    Why PL/SQL tuning?

    The best advice re PL/SQL is to AVOID at all costs. Whenever possible, use SQL.

    It is usually the SQL to be tuned so that sql is autonomous or in code.

    As the major part of PL/SQL uses SQL to get the job done, you will be not successful tuning PL/SQL, unless you set the SQL contained in it.

    Start with the Oracle documentation:

    http://docs.Oracle.com/CD/B28359_01/server.111/b28274/sql_overview.htm

    This chapter deals with the objectives for the development, explains how to identify the high resource SQL statements, which must be collected, offers suggestions of setting and explains how to create SQL test scenarios to solve problems in SQL.

    This chapter contains the following sections:

    Then, learn how to use and interpret what the Wizard Setup of Sql from Oracle can make and provide:

    Update Auto SQL - 11 g Release 2 (11.2)

    17 automatic SQL Tuning

    This chapter examines the SQL Auto setting of the Oracle database features. Automatic tuning of SQL automates the manual process, which is complex, time consuming and repetitive.

    This chapter contains the following sections:

    A lot of questions of PL/SQL, you encounter will be due to one of these things:

    1 poorly written SQL (see SQL tuning above)

    2. use of slow-by-slow (line by line) treatment in a loop

    3. poor use of collections and in bulk of treatment

    4. use of the dynamic sql

    All those who will take you to the SQL itself. The SQL is not set correctly if it is not possible for the PL/SQL to be tuned.

  • There will be a review of certification SQL Tuning 12 c?

    Hello

    I hope soon the SQL Tuning oracle 11g certification exam.

    Certification exam SQL Tuning oracle 12 c comes?

    Thank you


    Sorry - end of the day - my right jumped brain beyond the portion "SQL" to your question.  I seriously doubt that there will be an update to the review of SQL Tuning (1Z0-117) 11 g just for Oracle 12 c.  There is not a lot of change in the way that SQL should be given between 11 billion and 12 c, so a separate trial would be pretty useless.

  • additional licenses set forth for the use of Sql Tuning Advisor in SQL Developer 4.0.3

    Hello

    We have the Oracle 11 g Enterprise Edition Release 11.2.0.3.0 database. Do we need to acquire an oracle license extra for using SQL Tuning Advisor Option in SQL Developer 4.0.3

    No, they are installed by default.

    They must be licensed.

    Consult your contract or talk to your account manager Oracle for clarification.

  • Exception ORA when accepting SQL Tuning Set

    Hello

    RDBMS version: 11.2.0.1.0 & 11.2.0.4.0

    OS: OEL 5 (64-bit)

    I am creating a SQL tuning set and get both to do exception below. Tried to search on the forums also with the exception of the ORA, but unable to get any resolution for this exception ORA.

    The following awards were made: -.

    GRANT CREATE ANY SQL PROFILE TO SCOTT;
    GRANT DROP ANY SQL PROFILE TO SCOTT;
    GRANT ALTER ANY SQL PROFILE TO SCOTT;
    GRANT ADVISOR TO SCOTT;
    GRANT ADMINISTER SQL MANAGEMENT OBJECT TO SCOTT;
    grant execute on dbms_spm to SCOTT;
    grant administer sql management object to SCOTT;
    
    

    DECLARE
      my_task_name VARCHAR2(30);
      my_sqltext CLOB;
      my_sqlprofile_name VARCHAR2(4000);
    BEGIN
      my_sqltext   := 'SELECT * FROM emp';
      my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_text => my_sqltext, user_name => 'SCOTT', scope => 'COMPREHENSIVE', time_limit => 60, task_name => 'my_sql_tuning_task3', description => 'Demo Task to tune a query');
      DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'my_sql_tuning_task3');
      my_sqlprofile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE (task_name =>'my_sql_tuning_task3', name => 'my_sql_profile');   -- Culprit for the exception
      --dbms_output.put_line(my_sqlprofile_name);
    END;
    /
    
    Error report -
    ORA-13786: missing SQL text of statement object "1" for tuning task "my_sql_tuning_task3"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16255
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7133
    ORA-06512: at line 4
    13786. 00000 -  "missing SQL text of statement object \"%s\" for tuning task \"%s\""
    *Cause:    The user attempted to accept SQL profile for an object
               that has not a SQL text associated to it.
    *Action:   Check the identifier of the object and retry the operation.
    
    
    

    Would be really grateful if someone could point me in the right direction here.

    TIA...

    Personally, I wouldn't bother with a task of setting.

    If you are lucky who will recommend a sql profile based on adjustments of cardinality which may or may not be effective.

    I would just use either the COE_XFR_SQL_PROFILE. SQL script SQLT ( doc-id 1487302.1Support) or use SQL Plan baseline to apply the previous execution plan. The latter has the advantage of being able to make an evolution controlled all plans potentially better which would otherwise be generated.

    You can choose the older, better plan AWR in the same database or a different database, and then transport it.

Maybe you are looking for