Performance of the Oracle

Hi friends,

10.2.0.4.0 on Linux

Background:
We have the database running on the OS cluster.
Before the performance of the server on the server issue has Cpu spiked to 100% used. Custom top found some applications (small applications in general, what race in daily batches) were cpu 100% used and the same queries in AWR. For this reason, the database switched to Server B, the queries executed as correctly without problem.
Server A and B are clustered BONES and using the same hard drive memory.

After restarting the server/failover, the daily batch runs successfully without any problems for a few days (about 6 to 10 days). The 11th batch runs very slowly.

We try to find the solution,
Now, we are not suspecting the question is next to the Oracle. The problem may be with the side OS/hardware.

All the suggesitions/help will be appreciated.

Thank you
KSG

Hello

KSG wrote:

Thanks for your help Nikolay.

If necessary, I'll tie the AWR report #2, where the batch was properly executed on the failure on server B.

Thank you

KSG

No, it is not necessary.

The AWR report you posted was for a period of 9 hours, right? It shows CPU DB = 55 000 seconds. 9 hours = 32 400 seconds. For example, the database was using (on average) just 1.5 CPU on 16. I.e. average usage of the CPU by the database was only 10% (and total usage of CPU on the server, as I said earlier, was about 40%, i.e. the database is not yet the main consumer of CPU on the box).

So based on what I'm leaning to the version that the CPU problem you mentioned was not true. Most likely, you simply misread some of the CPU numbers in reports (like CPU DB = 91%, which could be confusing). To avoid such confusion, I recommend that you go through my blog on the interpretation of the figures of the AWR CPU: reports AWR: interpret the CPU usage | Diagnostician Oracle

If you leave this part of your account of the event, we have an intermittent problem of performance with a batch. As Jonathan said, SQL plan regression is the most likely explanation of that. If you have the License Pack Tuning and Diagnostic tests, then you can easily diagnose these problems using view ASH (not ASH report), especially if you instrument your code work properly batch:

(1) in your batch, call dbms_session.set_identifier ()

(2) once the task is completed, check out the SQL which took as long:

Select sql_id, count (*) / 10 elapsed_seconds

from the ashes of dba_hist_active_sess_history

where client_id =: client_id_you_set_above

and sample_time between: job_start_time and: job_finish_time

Group of sql_id

order of count (*) desc;

(3) check the hash value of the plan for this SQL query:

Select begin_interval_time time, plan_hash_value

of dba_hist_snapshot sn.

St dba_hist_sqlstat

where sn.snap_id = st.snap_id

and sql_id =: sql_id_found_above

begin_interval_time desc order

Best regards

Nikolai

Tags: Database

Similar Questions

  • OpenScript performing through the Oracle Test Manager on linux environments

    Hello

    I developed a couple of tests OpenScript (Java only) in my development environment (Windows). But I struggle to run these tests using Test Manager (which runs on a Linux - production environment) while BTA, they work perfectly well. We have the latest installed version of OATS is 12.1.0.2.

    When I try to run my tests OpenScript (via OTM) I get this error in the process_console log file:

    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: org/eclipse/core/Launcher/Main
    Caused by: java.lang.ClassNotFoundException: org.eclipse.core.launcher.Main
    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:202)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    The main class is not found: org.eclipse.core.launcher.Main.  Program ends.

    Anyone know what could be the problem and how can it be solved?
    Also, anyone has had luck OpenScript running tests in linux using OTM environments?

    Any help would be greatly appreciated.

    Best regards
    Karolis

    Hello Karolis
    Starting today, you can not run script OpenScript OTM on Linux. It's on the roadmap, but no I have not yet calendar.
    Two workaround options:
    1 / you deploy a remote agent on windows
    2 / you create a custom script in testcase type and you use the command line to run a load test script

    JDK/bin/java-jar OLTCommandLine.jar - run - session = test1_ad1-scenarioFile=/export/.../Test_Ad1.scn - OLTServer = localhost:8088 - user = oats-password = UE1-log=/export/.../ad1.log

    Good luck
    JB

  • Performance issues and options to reduce the loading with the Oracle text implementation

    Hi Experts,

    My database on Oracle 11.2.0.2 on Linux. We have Oracle implemented for the fuzzy search. Our oracle text indexes are defined as sync on commit that we cannot afford to have stale data.  Now our application done literally thousands of inserts/modifications/deletions of these columns where we have these Oracle text index defined. Thus, we see a significant impact on performance because the oracle text synchronization routines is called on each commit. We do nightly index optimization (optimization full every night at 3:00).  The text index oracle internal operations are appearing at the top of the sql page in our AWR report and fears it causes a lot of load on the DB.  Since we do optimization of the complete index once during the night, I think I should change that, and if I do, he's going to help us?

    For example, here are some data of AWR report my one day:

    Time elapsed (s) Executions Time by Exec (s) % Total % CPU %IO SQL ID SQL module SQL text
    27,386.25305 4410.0916.5015.829.98ddr8uck5s5kp3Start ctxsys.drvdml.com_sync_i...
    14,618.81213 9800.078.818.3927.7902yb6k216ntqfbegin ctxsys.syncrn (: idxownid,...)


    More top sql full text:

    ddr8uck5s5kp3begin ctxsys.drvdml.com_sync_index (: idxname,: idxmem,: partname);
    end
    02yb6k216ntqf

    begin ctxsys.syncrn (: idxownid,: idxoname,: idxid,: ixpid,: rtabnm,: flg); end;

    Now if I do optimization of the complete index that more often, and not only once night 15:00 will be this average, the load on DB sync on commit will decrease? If Yes, how many times should I optimized and the optimization itself does not lead to a load? Can anyone suggest?

    Thank you

    OrauserN

    It's to you which values you want to experiment.  Since 1 G, which is the same as 1024M is the maximum I could try that assigning to an index and see what effect it has.  You can use the same AWR report that you used previously and compare performance.  To determine when paging depends on your operating system and what tools you have.  Another option might be to use TRANSACTIONAL, that allows searching for unsynchronized lines and allow you to synchronize every five minutes, like Herald suggested, without any latency problem.  You can read about it here (scroll down to transaction):

    http://docs.Oracle.com/CD/E11882_01/text.112/e24436/csql.htm#CCREF23731

  • ASM and SCAN listener running of the Oracle user not user network

    Hi all

    Greetings for the day!

    In one of my new customer environment, I see that ASM and SCAN are running oracle user not user network, although the ORACLE_HOME is on the grid software. I read somewhere that we should run ASM and SCAN from grid not Oracle. Please let me know if I'm right and if there are consequences of the performer of the Oracle user.

    OS: Red Hat Enterprise Linux Server 6.5 (Santiago) 64-bit release

    Oracle RDBMS: 11204

    Oracle GI: 11204

    CAR Info: 2 node cluster.

    Thank you very much.

    AbbDBA

    The important word is expected here. It is suggested that 11.2, that the separation of roles, a non-oracle account must be used for the GI. But this is not essential, and certainly not wrong to use Oracle db and IM account as long as you do not use ASM according to security features. So nothing to worry about. You're good.

    Aman...

  • Performance of the database

    Hello
    I have an interesting question here. I have a database of size 80 GB its actuallty a Peoplesoft DB (Remember:Peoplesoft DB is null goal year Oracle DB). I have 120 users accessing it. We have a server of DB with 16 GB of RAM and CPU 8 - core. How to calculate the size to be allocated to the LMS No.. DB writer process required etc... To be short, I would like to have a list of init parameters that would make my DB more quickly. Thanks in advance.

    If you are on 10g or go, you can get help from the oracle Advisor to set your PGA and the LMS.

    v$ pga_target_advice
    V$ sga_target_advice

    in 10g, you can also generate a report AWR and ADDM for details and advice on the performance of the oracle.

    Thank you
    Christian Christmas Pal Singh

  • information about the performance of the Rules Manager

    I am very interested in this product... and yet, I also find little information on the performance of the oracle community.

    the absolute silence on this product with the usual oracle experts is also a bit suspect.

    I'm sure that there is degradation in performance related to flexibility gains that the tool provides... but what are the costs of performance?

    In addition, there is a "rule Manager utility" announced here... but where you acquire it?

    http://www.Oracle.com/technetwork/database/index-088908.html

    Hello

    I was also interested in this support for the rules of the DB, but I was disappointed to read the news of its demise and the suggestion to buy another product:

    Notice of obsolescence: Manager of rules and Expression filter features database Oracle [ID 1244535.1]
    "The Rules Manager and Expression of data filter Oracle's are removed in the next major version of database Oracle." Support is not available for the life of Oracle Database Release11g Release 2.
    (...)
    Visitors should not start new projects with policy Manager or the Filter Expression. All current user Rules Manager should consider migration to Oracle Business Rules, a component of Oracle Fusion Middleware. "

  • performance issue with the Oracle SQL query

    Dears

    Good evening

    I am new to begin to use Oracle SQL, I have a sql query which takes longer to run in production.

    Each table in the query contains 1.2 million records and DBA suggested using the "Oracle - tips. I don't have good knowledge on this subject and the difficulties to implement this advice for imrpovise performance. In the product the jobs Informatica are failed and stuck with this problem of query performance.

    I ask this forum for an emergency for me to solve this problem by using "advice". kindly help me.

     

    SELECT
    CASE.ID,
    CASE. DTYPE,
    CASE. Version
    CASE. EXTERNAL_REF,
    CASE. CREATION_TS,
    RQ. TYPE
    Of
    PAS_CASE CASE,
    AS_REQUEST RQ,
    CN PAS_CONTEXT
    where rq.case_id = case.id
    AND rq.id = cn.request_id
    and rq. DTYPE = "MAINREQUEST."
    and rq. TYPE in
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )
    and CN. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')
    AND CAST (CN. CREATION_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)
    AND
    CAST (CN. CREATION_TS AS DATE) < TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    -2nd request

    SELECT
    RA.ID,
    RHEUMATOID ARTHRITIS. Version
    RHEUMATOID ARTHRITIS. REQUEST_ID,
    RA.NAME,
    RHEUMATOID ARTHRITIS. VALUE,
    RHEUMATOID ARTHRITIS. LOB_ID,
    RHEUMATOID ARTHRITIS. DTYPE,
    RHEUMATOID ARTHRITIS. CREATION_TS,
    TASK. MAIN_REQ_TYPE
    PAS_REQUESTATTRIBUTE RA
    Join
    (
    Select tsk.ID, tsk. TYPE, main_req_type main_req.
    of tsk PAS_REQUEST
    Join
    (
    Select cn.id as context_id, rq. TYPE main_req_type
    of PAS_REQUEST rq
    Cn PAS_CONTEXT
    where rq.id = cn.request_id
    and rq. DTYPE = "MAINREQUEST."
    and rq. TYPE in
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.
    )
    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')
    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)
    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)
    and cn.ID between the 20141999999999999 AND 20141800000000000
    and rq.ID between the 20141999999999999 AND 20141800000000000

    ) main_req
    On tsk.parent_context_id = main_req.context_id
    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')
    and tsk.ID between $$ LOW_ID1 AND $$ HIGH_ID1
    ) task
    on the RA REQUEST_ID = task.ID
    and RA.ID between $$ LOW_ID1 AND $$ HIGH_ID1
    UNION

    SELECT
    RA.ID,
    RHEUMATOID ARTHRITIS. Version
    RHEUMATOID ARTHRITIS. REQUEST_ID,
    RA.NAME,
    RHEUMATOID ARTHRITIS. VALUE,
    RHEUMATOID ARTHRITIS. LOB_ID,
    RHEUMATOID ARTHRITIS. DTYPE,
    RHEUMATOID ARTHRITIS. CREATION_TS,
    MAIN_REQ. TYPE
    PAS_REQUESTATTRIBUTE RA
    Join
    (
    Select rq.id, rq.type
    of PAS_REQUEST rq
    Cn PAS_CONTEXT
    where rq.id = cn.request_id
    and rq. DTYPE = "MAINREQUEST."
    and rq. TYPE in
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.
    )
    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')
    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)
    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)
    and cn.ID between the 20141999999999999 AND 20141800000000000
    and rq.ID between the 20141999999999999 AND 20141800000000000
    ) main_req
    on the RA REQUEST_ID = main_req.ID

    -3rd request

    SELECT

    RB.ID,

    RB. DTYPE,

    RB. Version

    RB. TYPE,

    RB. CREATION_TS,

    RB. TASK_ID,

    RB. Color

    RB. GLOBAL_RESULT,

    TASK. MAIN_REQ_TYPE

    Of

    PAS_RESULTBLOCK RB

    Join

    (

    Select tsk.ID, tsk. TYPE, main_req_type main_req.

    of tsk PAS_REQUEST

    Join

    (

    Select cn.id as context_id, rq. TYPE main_req_type

    of PAS_REQUEST rq

    Cn PAS_CONTEXT

    where rq.id = cn.request_id

    and rq. DTYPE = "MAINREQUEST."

    and rq. TYPE in

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)

    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    and cn.ID between the 20141999999999999 AND 20141800000000000

    and rq.ID between the 20141999999999999 AND 20141800000000000

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    ) task

    We rb.task_id = task.ID

    and rb.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    and RB. TYPE is not null

    and RB. TYPE IN

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    UNION

    SELECT

    RB.ID,

    RB. DTYPE,

    RB. Version

    RB. TYPE,

    RB. CREATION_TS,

    RB. TASK_ID,

    RB. Color

    RB. GLOBAL_RESULT,

    TASK. MAIN_REQ_TYPE

    Of

    PAS_RESULTBLOCK RB

    Join

    (

    Select tsk.ID, tsk. TYPE, main_req_type main_req.

    of tsk PAS_REQUEST

    Join

    (

    Select cn.id as context_id, rq. TYPE main_req_type

    of PAS_REQUEST rq

    Cn PAS_CONTEXT

    where rq.id = cn.request_id

    and rq. DTYPE = "MAINREQUEST."

    and rq. TYPE in

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)

    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    and cn.ID between the 20141999999999999 AND 20141800000000000

    and rq.ID between the 20141999999999999 AND 20141800000000000

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    ) task

    We rb.task_id = task.ID

    and rb.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    and RB. TYPE is nullSELECT

    RB.ID,

    RB. DTYPE,

    RB. Version

    RB. TYPE,

    RB. CREATION_TS,

    RB. TASK_ID,

    RB. Color

    RB. GLOBAL_RESULT,

    TASK. MAIN_REQ_TYPE

    Of

    PAS_RESULTBLOCK RB

    Join

    (

    Select tsk.ID, tsk. TYPE, main_req_type main_req.

    of tsk PAS_REQUEST

    Join

    (

    Select cn.id as context_id, rq. TYPE main_req_type

    of PAS_REQUEST rq

    Cn PAS_CONTEXT

    where rq.id = cn.request_id

    and rq. DTYPE = "MAINREQUEST."

    and rq. TYPE in

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)

    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    and cn.ID between the 20141999999999999 AND 20141800000000000

    and rq.ID between the 20141999999999999 AND 20141800000000000

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    ) task

    We rb.task_id = task.ID

    and rb.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    and RB. TYPE is not null

    and RB. TYPE IN

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    UNION

    SELECT

    RB.ID,

    RB. DTYPE,

    RB. Version

    RB. TYPE,

    RB. CREATION_TS,

    RB. TASK_ID,

    RB. Color

    RB. GLOBAL_RESULT,

    TASK. MAIN_REQ_TYPE

    Of

    PAS_RESULTBLOCK RB

    Join

    (

    Select tsk.ID, tsk. TYPE, main_req_type main_req.

    of tsk PAS_REQUEST

    Join

    (

    Select cn.id as context_id, rq. TYPE main_req_type

    of PAS_REQUEST rq

    Cn PAS_CONTEXT

    where rq.id = cn.request_id

    and rq. DTYPE = "MAINREQUEST."

    and rq. TYPE in

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)

    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    and cn.ID between the 20141999999999999 AND 20141800000000000

    and rq.ID between the 20141999999999999 AND 20141800000000000

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    ) task

    We rb.task_id = task.ID

    and rb.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    and RB. TYPE is null

    -4th query

    SELECT
    RI.ID,
    UII DTYPE,
    UII Version
    UII RESULTBLOCK_ID,
    RI.NAME,
    UII VALUE,
    UII UNIT,
    UII Color
    UII LOB_ID,
    UII CREATION_TS,
    UII SEQUENCE,
    UII DETAILLEVEL,
    RES_BLK. MAIN_REQ_TYPE
    Of
    RI PAS_RESULTITEM
    Join
    (
    Select
    rb.ID, rb. TYPE rb_type, task. TYPE as the task_type, task. pas_resultblock rb main_req_type
    Join
    (
    Select tsk.ID, tsk. TYPE, main_req_type main_req.
    of tsk PAS_REQUEST
    Join
    (
    Select cn.id as context_id, rq. TYPE main_req_type
    of PAS_REQUEST rq
    Cn PAS_CONTEXT
    where rq.id = cn.request_id
    and rq. DTYPE = "MAINREQUEST."
    and rq. TYPE in
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.
    )
    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')
    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)
    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)
    and cn.ID between the 20141999999999999 AND 20141800000000000
    and rq.ID between the 20141999999999999 AND 20141800000000000
    ) main_req
    On tsk.parent_context_id = main_req.context_id
    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')
    and tsk.ID between the 20141999999999999 AND 20141800000000000
    ) task
    We rb.task_id = task.ID
    and rb.ID between the 20141999999999999 AND 20141800000000000
    and RB. TYPE IN
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.
    )
    ) res_blk
    On ri.resultblock_id = res_blk.ID
    where IN RI.NAME
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.
    )
    and RI.ID between the 20141999999999999 AND 20141800000000000
    and RI.NAME is not null
    UNION

    Select
    RI.ID,
    UII DTYPE,
    UII Version
    UII RESULTBLOCK_ID,
    RI.NAME,
    UII VALUE,
    UII UNIT,
    UII Color
    UII LOB_ID,
    UII CREATION_TS,
    UII SEQUENCE,
    UII DETAILLEVEL,
    RES_BLK. MAIN_REQ_TYPE
    of pas_resultitem ri
    Join
    (
    Select
    rb.ID, rb. TYPE rb_type, task. TYPE as the task_type, task. pas_resultblock rb main_req_type
    Join
    (
    Select tsk.ID, tsk. TYPE, main_req_type main_req.
    of tsk PAS_REQUEST
    Join
    (
    Select cn.id as context_id, rq. TYPE main_req_type
    of PAS_REQUEST rq
    Cn PAS_CONTEXT
    where rq.id = cn.request_id
    and rq. DTYPE = "MAINREQUEST."
    and rq. TYPE in
    (
    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.
    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.
    )
    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')
    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)
    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)
    and cn.ID between the 20141999999999999 AND 20141800000000000
    and rq.ID between the 20141999999999999 AND 20141800000000000
    ) main_req
    On tsk.parent_context_id = main_req.context_id
    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')
    and tsk.ID between the 20141999999999999 AND 20141800000000000
    ) task
    We rb.task_id = task.ID
    and rb.ID between the 20141999999999999 AND 20141800000000000
    ) res_blk
    On ri.resultblock_id = res_blk.ID
    where RI.ID between 20141800000000000 20141999999999999 AND
    and RI.NAME is null

    -REQUEST OF 5HT

    SELECT

    TSK.ID,

    TSK. Version

    TSK. DTYPE,

    TSK. CASE_ID,

    TSK. TYPE,

    TSK. CORRELATION_ID,

    TSK. INITIATOR,

    TSK. EXECUTOR,

    TSK. CATEGORY,

    TSK. PARENT_CONTEXT_ID,

    TSK. CREATION_TS,

    MAIN_REQ. MAIN_REQ_TYPE

    Of

    TSK PAS_REQUEST

    Join

    (

    Select cn.id as context_id, rq. TYPE main_req_type

    of PAS_REQUEST rq

    Cn PAS_CONTEXT

    where rq.id = cn.request_id

    and rq. DTYPE = "MAINREQUEST."

    and rq. TYPE in

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)

    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    and cn.ID between the 20141999999999999 AND 20141800000000000

    and rq.ID between the 20141999999999999 AND 20141800000000000

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk. DTYPE in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.ID between $$ LOW_ID1 AND $$ HIGH_ID1

    UNION

    Select

    MREQ.ID,

    MREQ. Version

    MREQ. DTYPE,

    MREQ. CASE_ID,

    MREQ. TYPE,

    MREQ. CORRELATION_ID,

    MREQ. INITIATOR,

    MREQ. EXECUTOR,

    MREQ. CATEGORY,

    MREQ. PARENT_CONTEXT_ID,

    MREQ. CREATION_TS,

    MREQ. TYPE

    of PAS_REQUEST mreq

    Cn PAS_CONTEXT

    where mreq.id = cn.request_id

    and mreq. DTYPE = "MAINREQUEST."

    and mreq. TYPE in

    (

    'bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ',' bgc.tbf.repair.vap', ' bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ',' bgc.cbm ',' bgc.dar.e2etest.preparation', ' bgc.chc.polling '.

    )

    and cn. STATUS ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and CAST (cn. END_TS AS DATE) > = TO_DATE ('2014-05-06 00:00:00 ',' ' YYYY-MM-DD HH24:MI:SS)

    and CAST (cn. END_TS AS DATE) < = TO_DATE ('2014-05-06 23:59:59 ',' ' YYYY-MM-DD HH24:MI:SS)

    and cn.ID between the 20141999999999999 AND 20141800000000000

    and mreq.ID between the 20141999999999999 AND 20141800000000000

    Tips will be may not be necessary (proportional to the cardinalities need)


    Select pc.id, pc.dtype, pc.version, pc.external_ref, pc.creation_ts, rq.type

    from pas_case

    as_request rq,

    CN pas_context

    where rq.case_id = pc.id

    and rq.id = cn.request_id

    and rq.dtype = 'MAINREQUEST. '

    and rq.type in ('bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution', ' bgc.tbf.repair.vap',

    'bgc.dar.e2etest ',' bgc.dar.e2etest.intermediate.execution', ' bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    and cn.status in ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and cn.creation_ts > = to_timestamp ('2014-05-06 00:00:00 ',' yyyy-mm-dd hh24:mi:ss')

    and cn.creation_ts<= to_timestamp('2014-05-06="" 23:59:59.999999','yyyy-mm-dd="">

    -2nd request

    with

    main_request as

    (select / * + materialize * /)

    CN.ID as context_id, rq.type as main_req_type

    of pas_request rq

    Join

    CN pas_context

    On rq.id = cn.request_id

    and rq.dtype = 'MAINREQUEST. '

    and rq.type in ('bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution', ' bgc.chc.polling',

    'bgc.tbf.repair.vap ',' bgc.dar.e2etest', ' bgc.dar.e2etest.intermediate.execution ',.

    'bgc.cbm ','bgc.dar.e2etest.preparation '.

    )

    and cn.status in ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and cn.end_ts > = to_timestamp ('2014-05-06 00:00:00 ',' yyyy-mm-dd hh24:mi:ss')

    and cn.end_ts<= to_timestamp('2014-05-06="" 23:59:59.999999','yyyy-mm-dd="">

    and cn.id between 20141800000000000 and 20141999999999999

    and rq.id between 20141800000000000 and 20141999999999999

    )

    Select ra.id, ra.version, ra.request_id, ra.name, ra.value, ra.lob_id, ra.dtype, ra.creation_ts, task.main_req_type

    of pas_requestattribute ra

    Join

    (select tsk.id, tsk.type, main_req.main_req_type

    from pas_request tsk

    Join

    main_request main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk.dtype in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.id between $$ low_id1 and $$ high_id1

    ) task

    We ra.request_id = task.id

    and ra.id between $$ low_id1 and $$ high_id1

    Union

    Select ra.id, ra.version, ra.request_id, ra.name, ra.value, ra.lob_id, ra.dtype, ra.creation_ts, main_req.type

    of pas_requestattribute ra

    Join

    main_request main_req

    On ra.request_id = main_req.context_id

    -3rd request

    Select rb.id, rb.dtype, rb.version, rb.type, rb.creation_ts, rb.task_id, rb.color, rb.global_result, task.main_req_type

    of pas_resultblock rb

    Join

    (select tsk.id, tsk.type, main_req.main_req_type

    from pas_request tsk

    Join

    (select cn.id as context_id, rq.type as main_req_type

    of pas_request rq

    Join

    CN pas_context

    On rq.id = cn.request_id

    and rq.dtype = 'MAINREQUEST. '

    and rq.type in ('bgc.dar.vap.resolution.advice ','bgc.dar.e2etest.execution ',

    'bgc.tbf.repair.vap ','bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ','bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    and cn.status in ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and cn.end_ts > = to_timestamp ('2014-05-06 00:00:00 ',' yyyy-mm-dd hh24:mi:ss')

    and cn.end_ts<= to_timestamp('2014-05-06="" 23:59:59.999999','yyyy-mm-dd="">

    and cn.id between 20141800000000000 and 20141999999999999

    and rq.id between 20141800000000000 and 20141999999999999

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk.dtype in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.id between $$ low_id1 and $$ high_id1

    ) task

    We rb.task_id = task.id

    and rb.id between $$ low_id1 and $$ high_id1

    where the type is null

    or (type is not null

    type in ('bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution ', ' bgc.tbf.repair.vap',

    'bgc.dar.e2etest ',' bgc.dar.e2etest.intermediate.execution', ' bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    )

    -4th query

    Select ri.id, ri.dtype, ri.version, ri.resultblock_id, ri.name, ri.value, ri.unit, ri.color, ri.lob_id.

    RI.creation_ts, RI. Sequence, RI. DetailLevel, res_blk.main_req_type

    of pas_resultitem ri

    Join

    (select rb.id, rb.type as rb_type, task.type as task_type, task.main_req_type)

    of pas_resultblock rb

    Join

    (select main_req_type, tsk.id, tsk.type, main_req.)

    from pas_request tsk

    Join

    (select cn.id as context_id, rq.type as main_req_type

    of pas_request rq

    Join

    CN pas_context

    On rq.id = cn.request_id

    and rq.dtype = 'MAINREQUEST. '

    and rq.type in ('bgc.dar.vap.resolution.advice ','bgc.dar.e2etest.execution ',

    'bgc.tbf.repair.vap ','bgc.dar.e2etest ',.

    'bgc.dar.e2etest.intermediate.execution ','bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    and cn.status in ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and cn.end_ts > = to_timestamp ('2014-05-06 00:00:00 ',' yyyy-mm-dd hh24:mi:ss')

    and cn.end_ts<= to_timestamp('2014-05-06="" 23:59:59.999999','yyyy-mm-dd="">

    and cn.id between 20141800000000000 and 20141999999999999

    and rq.id between 20141800000000000 and 20141999999999999

    ) main_req

    On tsk.parent_context_id = main_req.context_id

    and tsk.dtype in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.id between 20141800000000000 and 20141999999999999

    ) task

    We rb.task_id = task.id

    and rb.id between 20141800000000000 and 20141999999999999

    and rb.type in ('bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution', ' bgc.tbf.repair.vap',

    'bgc.dar.e2etest ',' bgc.dar.e2etest.intermediate.execution', ' bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    ) res_blk

    On ri.resultblock_id = res_blk.id

    and ri.id between 20141800000000000 and 20141999999999999

    where ri.name is null

    or (ri.name is not null

    and ri.name in ('bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution', ' bgc.tbf.repair.vap',

    'bgc.dar.e2etest ',' bgc.dar.e2etest.intermediate.execution', ' bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    )

    -5th application

    with

    main_request as

    (select / * + materialize * / )

    mreq.ID, mreq.version, mreq.dtype, mreq.case_id, mreq.type, mreq.correlation_id, mreq. Initiator, mreq. Executor,

    mreq. Category, mreq.parent_context_id, mreq.creation_ts, mreq.type

    of pas_request mreq

    Join

    CN pas_context

    On mreq.id = cn.request_id

    and mreq.dtype = 'MAINREQUEST. '

    and mreq.type in ('bgc.dar.vap.resolution.advice ',' bgc.dar.e2etest.execution', ' bgc.tbf.repair.vap',

    'bgc.dar.e2etest ',' bgc.dar.e2etest.intermediate.execution', ' bgc.cbm ',.

    'bgc.dar.e2etest.preparation ','bgc.chc.polling '.

    )

    and cn.status in ('FINISHED', 'CANCEL', 'TIMEOUT', 'ERROR')

    and cn.end_ts > = to_timestamp ('2014-05-06 00:00:00 ',' yyyy-mm-dd hh24:mi:ss')

    and cn.end_ts<= to_timestamp('2014-05-06="" 23:59:59.999999','yyyy-mm-dd="">

    and cn.id between 20141800000000000 and 20141999999999999

    and mreq.id between 20141800000000000 and 20141999999999999

    )

    Select tsk.id, tsk.version, tsk.dtype, tsk.case_id, tsk.type, tsk.correlation_id, tsk.initiator, tsk.executor,

    TSK. Category, tsk.parent_context_id, tsk.creation_ts, main_req.main_req_type

    from pas_request tsk

    Join

    main_request main_req

    On tsk.parent_context_id = main_req.id

    and tsk.dtype in ('ANALYSIS_TASK', 'DECISION_TASK')

    and tsk.id between $$ low_id1 and $$ high_id1

    Union

    SELECT id, version, dtype, case_id, type, correlation_id, initiator, executor,

    category, type parent_context_id, creation_ts

    of main_request

    Concerning

    Etbin

  • to understand the ORACLE

    Hello world

    I want to not know le Headline to understand the ORACLE performance tuning.

    And thank you

    Hello

    You can quickly go through 2 days guide

    Oracle Database 2 day + Performance Tuning Guide

    https://docs.Oracle.com/database/121/TDPPT/tdppt_preface.htm#TDPPT336

    Concerning

    Hitgon

  • How to upgrade PVE political in the Oracle 11 g 2 database

    Hello

    I am trying to connect to a SFTP with JAVA server in the Oracle database (using Java lib jcraft jsch (lib)

    I added JAR files in database, compile my proc stored without errors.

    When you try to perform my procedure, I have this message

    "" Aes256-cbc"cipher is required, but it is not available.

    On my desk, I can update my JDK with UnlimitedJCEPolicyJDK7 PVE security

    But how do I update PVE of the JDK to the database? h

    I've updated the files $ORACLE_HOME/jdk/jre/lib/security/local_policy.jar and $ORACLE_HOME/jdk/jre/lib/security/US_export_policy.jar but it does not work.

    Any ideas?

    Thank you

    The PVE for JDK6 is evil, because the version of the JDK in Oracle Database 11 g 2 is JDK5 (!)

    So I updated with this JCE jar files: Java Archive downloads - Java platform Technologies

    And it works!

  • Need help on the text of the Oracle

    Hi Master,

    I'm working on the text of the Oracle. I executed the step/commands below. All are executed successfully. But I saw no improvement in my work. But I have a doubt, explain below.

    create the table ent_dnt in select * from entitlement_dnt;

    BEGIN

    CTX_DDL. CREATE_PREFERENCE ("oracletext_datastore", "MULTI_COLUMN_DATASTORE");

    CTX_DDL. SET_ATTRIBUTE

    ("oracletext_datastore", "COLUMNS",

    "ORDER_NUMBER, GENERIC_PRODUCT_NAME_EXT, ENTITLEMENT_REF_ID, DEVICE_ASSET_ID, DEVICE_UNIQUE_ID, SWSERVICETAG, PRODUCT_DESC');

    END;

    CREATE INDEX idx_oracle_text

    ON Ent_dnt (search_cols)

    INDEXTYPE IS CTXSYS. FRAMEWORK

    PARAMETERS ("DATASTORE oracletext_datastore");

    BEGIN

    DBMS_STATS. GATHER_TABLE_STATS ('EE', 'ent_DNT', cascade = > TRUE);

    DBMS_STATS. GATHER_TABLE_STATS ('EE', 'upd_DNT', cascade = > TRUE);

    DBMS_STATS.gather_index_stats ('EE', 'idx_oracle_text1');

    DBMS_STATS.gather_index_stats ('EE', 'idx_oracle_text');

    END;

    the steps above are created / executed successfully. But when to run my select query... I did not see anywhere oracle text index name in my plan to explain.

    Plan

    SELECT STATEMENT ALL_ROWSCost: 28 393 bytes: 49 675 cardinality: 5

    3 TRI GLOBAL bytes: cardinality 8: 1

    TABLE ACCESS BY INDEX ROWID TABLE EA 2. EE_PROD_GRP_ENTITLEMENT cost: 4 bytes: 8 Cardinality: 1

    1 INDEX RANGE SCAN INDEX EE. IDX_PGE_ENT_ID cost: cardinality 3: 1

    5 SORTING GLOBAL bytes: cardinality 8: 1

    TABLE 4 TABLE EA FULL ACCESS. ENT_DNT cost: 26 781 bytes: 8 Cardinality: 1

    20 SEE EE. Cost: 28 393 bytes: 49 675 cardinality: 5

    19 STOPKEY COUNTY

    18 SEE EE. Cost: 28 393 bytes: 49 610 cardinality: 5

    GROUP 17 SORT BY STOPKEY cost: 28 393 bytes: 2 295 cardinality: 5

    the HASH JOIN cost EXTERNAL 16: 28 392 bytes: 2 295 cardinality: 5

    Cost EXTERNAL 14 NESTED LOOPS: 28 388 bytes: 1 808 cardinality: 4

    Cost EXTERNAL 11 NESTED LOOPS: cardinality 28 384 bytes: 1 600: 4

    Cost of 8 HASH JOIN: 28 383 bytes: 1 552 cardinality: 4

    TABLE 6 TABLE EA FULL ACCESS. UPD_DNT cost: 1 089 bytes: 174 cardinality: 6

    TABLE 7 TABLE EA FULL ACCESS. ENT_DNT cost: 27 292 bytes: 110,648,108 cardinality: 308 212

    TABLE ACCESS BY INDEX ROWID EE TABLE 10. PRODUCT_LICENSE_PART cost: 1 bytes: cardinality 1: 12

    9 INDEX RANGE SCAN INDEX EE. IDX_PLP_PD_DATA_ID cost: cardinality 0: 1

    TABLE ACCESS BY INDEX ROWID EE TABLE 13. PD_KT_DETAILS cost: 1 bytes: cardinality 1: 52

    12 INDEX RANGE SCAN INDEX EE. IDX_PKD_PART_NUM cost: cardinality 0: 1

    TABLE 15 TABLE EA FULL ACCESS. Cost LEGACY_CONFIG: 03:00 cardinality: 5

    and cost is so high. But when I ran the query below. I saw no table $.

    TEST@orcl_11gR2 > SELECT object_name, object_type

    2 FROM user_objects

    3. WHERE object_name LIKE '% oracle % '.

    4.

    Usually DR$ $I $K, $N, $R, $X tables aren't creaed. where is the problem? Please help me. I perform this task.

    Concerning

    AR

    3. I L 36 records on the ent_dnt table... I added another 1 lakh records more... This index is does it work properly? or should I update again?

    As long as you use SYNC (ON COMMIT) each ecord you insert is indexed immediately after you have posted.  This will result in gradually increasing index fragmentation, you OPTIMIZE the index or ALTER and REBUILD the index or DROP and RE-CREATE the index to reduce fragmentation and keep the queries that use CONTAINS to run fast.  How many times you need to do this depends on how many times you insert the amount of data.

    Also, if you update data, then you must make sure that whenever you do an update, you update the column that the index is created as search_cols, in order to trigger the synchronization.  That you updated the search_cols to is okay, as long as it is updated.  For example, you might be updated to U.

  • Performance of the queries in order to get the most recent price

    Happy new year everyone.

    I have a table of price in my system that has several awards for each product with the date, the price is entered into force.

    I have queries throughout the system to retrieve the most recent actual price for the date of the transaction.

    I can find to implement the easiest way is to have a user-defined function to collect the prize.

    My problem is that many of my questions have access to large amounts of data (for example, transactions) and my table of prices is also big enough - both have millions of records. Using a Pl/SQL function defined by the user in my query, I get a lot of switching context between SQL and PL/SQL and my questions are not well

    Here is an example of code, which simplifies my scenario:

    drop table xo_stock_trans;
    create table xo_stock_trans (item varchar2(25), trans_date date, quantity number(20,4));
    insert into xo_stock_trans values('A',TO_DATE('25-DEC-2014','DD-MON-YYYY'), 4);
    insert into xo_stock_trans values('A',TO_DATE('27-DEC-2014','DD-MON-YYYY'), -2);
    insert into xo_stock_trans values('A',TO_DATE('28-DEC-2014','DD-MON-YYYY'), 5);
    insert into xo_stock_trans values('B',TO_DATE('23-DEC-2014','DD-MON-YYYY'), 20);
    insert into xo_stock_trans values('B',TO_DATE('26-DEC-2014','DD-MON-YYYY'), -6);
    insert into xo_stock_trans values('B',TO_DATE('29-DEC-2014','DD-MON-YYYY'), 15);
    /
    -- Generate lots more data
    BEGIN
        -- Generate more trans dates
        for r in 1..1000
        LOOP
            insert into xo_stock_trans
            select item, trans_date - r - 7 as  trans_date, ROUND(dbms_random.value(1,50),2) as quantity
            from xo_stock_trans
            where trans_date between TO_DATE('23-DEC-2014','DD-MON-YYYY') AND TO_DATE('29-DEC-2014','DD-MON-YYYY')
              and item in ('A','B');
        END LOOP;
        COMMIT;
        -- generate more items
        for lt in 1..12 
        LOOP
            -- generate C,D, E, items
            INSERT into xo_stock_trans
            SELECT chr(ascii(item)+(lt*2)) as item, trans_date, quantity
            from xo_stock_trans
            where item in ('A','B');
            -- generate A1, A2, B1, B2, etc
            for nm in 1..10
            LOOP
                INSERT INTO xo_stock_trans
                select item || to_char(nm), trans_date, quantity
                from xo_stock_trans
                where length(item) = 1;
            END LOOP;
            COMMIT;
        END LOOP;
        COMMIT;
    END;
    /
    create index xo_stock_trans_ix1 on xo_stock_trans (item);
    create index xo_stock_trans_ix2 on xo_stock_trans (trans_date);
    exec dbms_stats.gather_table_stats(ownname =>user, tabname => 'XO_STOCK_TRANS' , estimate_percent => 100, degree => dbms_stats.auto_degree, cascade=>true);
    /
    
    
    drop table xo_prices;
    create table xo_prices (item varchar2(25), price_date date, gross_price number(20,4), net_price number(20,4), special_price number(20,4) );
    insert into xo_prices values ('A', to_date('01-DEC-2014','DD-MON-YYYY'), 10, 8, 6);
    insert into xo_prices values ('A', to_date('25-DEC-2014','DD-MON-YYYY'), 9, 8, 6);
    insert into xo_prices values ('A', to_date('26-DEC-2014','DD-MON-YYYY'), 7, 6, 4);
    insert into xo_prices values ('B', to_date('01-DEC-2014','DD-MON-YYYY'), 5.50, 4.50, 3);
    insert into xo_prices values ('B', to_date('25-DEC-2014','DD-MON-YYYY'), 5.00, 4.00, 3);
    insert into xo_prices values ('B', to_date('26-DEC-2014','DD-MON-YYYY'), 3.50, 2.50, 2);
    /
    -- Generate lots more data
    BEGIN
        -- Generate more price dates
        for r in 1..1000
        LOOP
            insert into xo_prices
            select item, price_date - r - 7 as  price_date,gross_price, net_price, special_price
            from xo_prices
            where price_date between TO_DATE('23-DEC-2014','DD-MON-YYYY') AND TO_DATE('29-DEC-2014','DD-MON-YYYY')
              and item in ('A','B');
        END LOOP;
        COMMIT;
        -- generate more items
        for lt in 1..12 
        LOOP
            -- generate C,D, E, items
            INSERT into xo_prices
            SELECT chr(ascii(item)+(lt*2)) as item, price_date, gross_price + (lt*2), net_price + (lt*2), special_price + (lt*2)
            from xo_prices
            where item in ('A','B');
            -- generate A1, A2, B1, B2, etc
            for nm in 1..10
            LOOP
                INSERT INTO xo_prices
                select item || to_char(nm), price_date, gross_price, net_price, special_price
                from xo_prices
                where length(item) = 1;
            END LOOP;
            COMMIT;
        END LOOP;
    END;
    /
    
    create index xo_prices_ix1 on xo_prices (item, price_date);
    exec dbms_stats.gather_table_stats(ownname =>user, tabname => 'XO_PRICES' , estimate_percent => 100, degree => dbms_stats.auto_degree, cascade=>true);
    /
    
    create or replace function xo_get_price(I_Item in VARCHAR2, I_Date in DATE, i_Price_type IN VARCHAR2) RETURN NUMBER
    IS
        -- Function to get most recent effective price prior to the date
        CURSOR c_get_prices(P_Item VARCHAR2, P_Date VARCHAR2)
        IS
        SELECT gross_price, net_price, special_price
        FROM XO_PRICES
        WHERE item = P_Item
         AND price_date <= P_Date
        ORDER BY price_date desc; -- most recent price
        
        l_gross_price NUMBER(20,4);
        l_net_price NUMBER(20,4);
        l_special_price NUMBER(20,4);
    BEGIN
        OPEN c_get_prices(I_Item, I_Date);
        FETCH c_get_prices INTO l_gross_price, l_net_price, l_special_price;
        CLOSe c_get_prices;
        
        IF I_Price_Type='GROSS' then return l_gross_price;
        ELSIF I_Price_Type= 'NET' then return l_net_price;
        ELSIF I_Price_Type= 'SPECIAL' then return l_special_price;
        END IF;
    END xo_get_price;
    /
    
    -- Here is a typical query I am trying to perform
    select tr.item, tr.trans_date, tr.quantity
        , xo_get_price(tr.item, tr.trans_date, 'GROSS') as gross_price
        , xo_get_price(tr.item, tr.trans_date, 'NET') as net_price
        , xo_get_price(tr.item, tr.trans_date, 'SPECIAL') as special_price
    from xo_stock_trans tr
    where tr.trans_date between '01-AUG-2014' and '31-AUG-2014';
    

    I would like to refactor my request so that I do not use the user Pl/SQL functions, but so far I can't get something that works better than the SQL above. For example, the following query is MUCH longer:

    select tr.item, tr.trans_date, tr.quantity
        , pr.gross_price
        , pr.net_price
        , pr.special_price
    from xo_stock_trans tr
    join xo_prices pr on pr.item = tr.item
                    and pr.price_date = (select max(pr2.price_date)
                                         from xo_prices pr2
                                         where pr2.item = pr.item
                                           and pr2.price_date <= tr.trans_date
                                         )
    where tr.trans_date between '01-AUG-2014' and '31-AUG-2014';
    

    I'm interested to know if anyone has addressed a similar scenario and have managed to write more efficient code.

    I looked at the determinism/manual caching of the function, but the article/date combinations are quite unique and therefore he does not benefit from him.

    Any suggestion under review - parallelism, analytical, pipeline functions, etc.

    Alan

    Hi, Alan.

    Alan Lawlor wrote:

    ...

    My problem is that many of my questions have access to large amounts of data (for example, transactions) and my table of prices is also big enough - both have millions of records. Using a Pl/SQL function defined by the user in my query, I get a lot of switching context between SQL and PL/SQL and my questions are not well...

    You got that right!  User-defined functions can be very practical, but this practice comes with a price.

    What version of Oracle are you using?  The Oracle 12, there is a new feature of 'temporal validity' which may help you.

    In any version, it will be much faster if you add a new column to the xo_prices table.  You can call this end_date, although it would in fact be the date when some other prices took effect.  You might put DATE' 9999-12-31 in the column end_date for current prices.  You can calculate end_date using the analytical function of LEAD.  Be sure to re-calcluate end_date when you insert new rows into xo_prices, or when you update the dates on existing lines.

    Once you have PRICE_DATE and end_date in the XO_PRICES table, you can join this table to get the real price from d by including

    AND d > = xo_prices.price_date

    AND d< >

    in the join condition.

    In some situations, especially when you don't have much different (item, dates) combinations, scalar-sub-queries could be faster than joins.

    Whatever it is, it participates without PL/SQL, so there is no context switching.

  • performance of the 10g search text fuzzy

    Hello to all members of this community,

    IM new to this and I have a question that belongs to the Oracle 10g text.

    My configuration:

    Oracle Database 10 g Enterprise Edition Release 10.2.0.4.0 - 64 bit

    8 cores with each 2,5 GHz

    64 GB OF RAM

    What I would do:

    I would like to compare a large amount of games of lines between them so that human caused errors (e.g. spelling, typos) will not be tolerated.

    My setup of CONTEXT of the TEXT is as follows:

    MULTI_COLUMN_DATASTORE with each column to compare.

    begin
      ctx_ddl.create_preference('my_datastore', 'MULTI_COLUMN_DATASTORE');
      ctx_ddl.set_attribute('my_datastore', 'columns', 'column1, ...'); 
    end;
    

    BASIC_LEXER - with the parameters of the GERMANS:

    begin
       ctx_ddl.create_preference('my_lexer', 'BASIC_LEXER');
       ctx_ddl.set_attribute('my_lexer', 'index_themes', 'NO');
       ctx_ddl.set_attribute('my_lexer', 'index_text', 'YES');
       ctx_ddl.set_attribute('my_lexer', 'alternate_spelling', 'GERMAN');
       ctx_ddl.set_attribute('my_lexer', 'composite', 'GERMAN');
       ctx_ddl.set_attribute('my_lexer', 'index_stems', 'GERMAN');
       ctx_ddl.set_attribute('my_lexer', 'new_german_spelling', 'YES');
    end;
    

    BASIC_WORDLIST - with the parameters of the GERMANS:

    begin
       ctx_ddl.create_preference('my_wordlist', 'BASIC_WORDLIST');
       ctx_ddl.set_attribute('my_wordlist','FUZZY_MATCH','GERMAN');
       ctx_ddl.set_attribute('my_wordlist','FUZZY_SCORE','60'); --defaults
       ctx_ddl.set_attribute('my_wordlist','FUZZY_NUMRESULTS','100'); --defaults
       --ctx_ddl.set_attribute('my_wordlist','SUBSTRING_INDEX','TRUE'); --uncommented due to long creation time of index
       ctx_ddl.set_attribute('my_wordlist','STEMMER','GERMAN');
    end;
    

    And a BASIC_SECTION_GROUP with a field_section for each column.

    begin
      ctx_ddl.create_section_group(
        group_name => 'my_section_group', 
        group_type => 'BASIC_SECTION_GROUP'
      );
      ctx_ddl.add_field_section(
        group_name   => 'my_section_group',
        section_name => 'column1',
        tag          => 'column1'
      );
    ...
    end;
    

    I create the index with

    create index idx_myfulltextindex on fulltexttest(column1)
    indextype is ctxsys.context
    parameters ('datastore my_datastore 
                 section group my_section_group 
                 lexer my_lexer
                 wordlist my_wordlist 
                 stoplist ctxsys.empty_stoplist')
    

    Everything works well functionally.

    In my test scenario, I had a table with lines about 100,000 that has a primary key that is not in the CONTEXT index.

    The problem:

    I do a query like:

    SELECT SCORE(1), a.* 
    FROM fulltexttest a 
    WHERE CONTAINS(a.column1, 'FUZZY(({TEST}),,,W) WITHIN COUMN1', 1) 
      AND a.primkey BETWEEN 1000 AND 4000
    

    This will do a full text search in a set of 3000 lines. Here, the response time is almost immediate. Maybe a second.

    If I do the same in a slider repeatedly (> 1000) with various search terms, we take one of course a lot of time. It does in the average 1 requests per second.

    I thought that this cannot be that slow and I tested the same with:

    SELECT SCORE(1), a.* 
    FROM fulltexttest a 
    WHERE CONTAINS(a.column1, '({TEST}) WITHIN COUMN1', 1) 
      AND a.primkey BETWEEN 1000 AND 4000
    

    NOTE there is no fuzzy search more...

    With that, it is up to 20 times faster.

    The cpu of the server about 15% charge when the fuzzy query processing.

    So:

    If I do a fuzzy search, it seems do not access the index. I thought I was saying to the index to calculate the results of 100 extensions in advance.

    I'm doing it wrong? Or is it not possible to build a particular Index to the fuzzy search?

    Are there suggestions to improve performance? Note that I have already read the guide (7 Tuning Oracle Text). None caused advice cure.

    I would be grateful if anyone can help me in this case... Or simply to give an indication.

    Thank you

    Dominik

    The attributes of a list of words can be used to specify how developed the stems and fuzzies create prefix and substring index.

    If you do a lot of research with generic characters from end, like partialword % then a prefix index can make these quick searches.  If you do the research with two wildcard characters, such as % partialword % then an index of the substring can make this faster research.  There is a trade-off between taking time and storage space to create and maintain the index with prefixes and/or substrings and time of the query.  You can specify the minimum length of a prefix.  The shorter length, prefixes no longer possible and the longer it takes to create the largest index.  So you need to use depends on what types of queries you expect most of the time.

    I don't know if you have tested from queries.  The attribute index_stems of the lexer and the attribute of forms derived from the word list generator are in conflict.  You must keep the generator attribute of forms derived from the list of words and do not use the attribute index_stems of the lexer.

  • What do I need install Oracle Database 11 g 2 for the Oracle 10 g database migration?

    Hi all

    Would you be kind enough to help me with the following question!  I currently have Oracle Database 10 g on the old servers to my work and I want to install the GR 11, 2 on Windows Server 2008 R2 Enterprise Oracle database to new servers for upgrade.  I also forms, reports and Designer 10 g to maintain our existing applications.  So, I already looked in the Certification and found the following:

    Latest version of the product: latest version of the database server window weblogic

    Form Builder 11.1.2.0.0 11.2.0.4.0 7, 2008 R2, 2008 10.3.6.0.0

    Reports           11.1.2.0.0                                           11.2.0.4.0                                                 7, 2008 R2, 2008                                   10.3.6.0.0

    Designer 10.1.2.6.0 11.2.0.1.0 xp, vista, 7, 2003 (all 32 bit)

    For Designer, it is approved for a 32 - bit window, so I'm having trouble with the new requirement of system this window must be after 2003.  I want to take all of the availability and follow the Oracle certification (except that I will be given Designer because of compliance) as above.  I'm new with Oracle, and I don't know what comes with what to do it is complete.

    1. I'm going to install a database server (free 11.2.0.4.0 as described above) in a new server (2008 R2), then what I have to install the WebLogic Server with it?

    2. I'll install the generator of reports and Forms Builder (11.1.2.0.0) in another server (2008R2), so what I have to install WebLogic Server as well with her?

    3. what else do I need to install on this two server so that they work so that I can begin to migrate all existing data, forms and States more?

    Any advice would be greatly appreciated.  Thank you.

    Remember that this forum is targeted to the Oracle Forms product, for questions about the database can be better answered in one of the areas of database.  That being said, here are my comments:

    1 I'll install a database server (version 11.2.0.4.0 as described above) in a new server (2008 R2), then what I have to install the WebLogic Server with it?

    A database facility didn't need of WLS (which I am aware). Consider what you want is a typical design at three levels. Database - average level (applications server) - Client (tools and end user).   Each level has nothing to do with the other installation point of view assuming that they are not installed on the same computer. WLS is a middleware software (medium level). Be sure to check the product documentation before performing any installation. The 11.2 DB docs can be found here:

    http://docs.Oracle.com/CD/E11882_01/index.htm

    2. I will install Forms Builder and Report Builder (11.1.2.0.0) in another server (2008R2), so what I have to install WebLogic Server as well with it?

    Tools (Forms Builder, generator of reports, etc.) are not remote or web tools.  These must be installed on each developer's computer.  The installation of these tools does not require that WLS be installed first (on the developer's computer), but there is no need to be run unless the developer wants to apply locally for testing.  For a production deployment (multi-user), a similar concept will be used.  WLS will be installed first, followed by the forms and reports Services (runtime).  It will be on your remote server (medium level).  Software distribution you use will be exactly the same for the developer and the installation of intermediate level.  The difference will be in the options you choose during installation.  If you want to include manufacturers during installation, simply check the appropriate boxes when you are prompted.

    Also, if you plan to use the forms/States 11 GR 2, I recommend not using 11.1.2.0 and instead use 11.1.2.2, which is the latest version. F/R 11.1.2.2 installation requires that you first install WLS 10.3.6.  You should refer to the product documentation before beginning any installation. Specifically, carefully examine the product Setup Guide and Guide to the system requirements. The 11.1.2.2 doc library can be found here:

    3 what else do I need to install on this two server so that they work so that I can begin to migrate all the existing data, forms and States on?

    Looks like you've covered everything.  The granular details will be covered in the Installation and Guides to the system requirements.

    My recommendations:

    o ensure that each machine has at least 4gig of RAM

    o ensure that each machine has a static IP address before you start any part of the installation.  This can be done without a static IP address, but you must take additional steps (see Guide to Sys Req).

    o on machines where you plan to install WLS, make sure you have a 64 bit JDK installed first.  If you don't use a F/R 11.1.2.2, you must use Java 6.  However, if you decide to use 11.1.2.2, you can use Java 6 or 7.  Do not use Java 8 in all cases.

    When it comes to the designer, it must be installed on an old machine.  In General, I do not recommend to use it longer.  Although there is currently not a way to full migration out of it, you can use SQL Developer to manage the db objects that were created/used with it.  There are several MyOracleSupport documents that discuss the issue.  You can search the Knowledge Base of MOS to find or contact Support for more information.

  • Reg: Preloading in the Oracle client.

    Hi Experts,

    What exactly is the concept behind the 'prefetch' in the Oracle client.

    My understanding - is the number of records retrieves customer data base and throws it to the user.

    Read a few posts on AskTom

    1. https://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:6840389700346552727

    2. https://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:429660240587

    But still I got some doubts-

    1. you want to understand the concept in detail as network round trips, data packets, etc.

    2. a scenraio - say my query will generate 158 K records, and I put my line Prefetch = 3500 to my client. It will be really beneficial? The customer while recovery displays the current state as "go get... records of 2002...". 3003, 4004... etc.

    Why get it 1,000 records, while I put the 3500.

    Please notify.

    Thank you and best regards,

    -Nordine

    (on Oracle 11.2.0.3.0 / SQL client Tools)

    Imagine the most stupid possible implementation (in a perspective of network traffic)

    The client sends a request to the database (1 trip)

    The client then requests the first line

    Oracle executes the request well enough to find the first line, which returns to the client (1 trip)

    The client then requests the following line

    Oracle executes the request well enough to find the first line, which returns to the client (1 trip)

    ---

    Repeat 158 000 times, until the last line is read

    As a round trip network is, in the best cases, the order of 10 milliseconds, it would mean that 158 000 back and forth network would consume seconds 1580 or about 26 minutes just networking air before adding in time for Oracle to generate results or the customer to do something with the results.

    Table extraction generally reduced this problem by allowing the client to fetch more than 1 row with each round trip.  If you pick 100 lines at once, you have need of round-trips of 1580, which would take 15.8 seconds in our environment of hypothetical return of 10ms.  If you get 1000 rows at a time, you have 158 network trips that would take 1.58 seconds.  But, of course, is not really as simple as that.  Network packets are not arbitrarily size so the lines you are great and go look for these lines, the packages more you exchange which makes extraction individual times more.  This means that network fetch load reduction is almost certainly less linear on a reasonable range of fetch sizes - maybe the example of 100 line passes 30 seconds on fetch of network load and the sample line of 1000 passes 10 seconds.  As with anything, you want to compare in your environment with your data to see where your application gets the best performance.

    As for what the customer is displayed, it is a question for the customer.  I guess the customer is written to view independent progress of the fetch size.

    Justin

  • lack of performance in the documents XML SELECT-ing

    Hello fields, I'm new to the world of XML. But as a DBA, now I'm in the position to suggest the best performance improvement in access to XML documents.

    Problem:

    There is a batch of informatica, fetch the records in XML tables (almost 400, one by one) stored in the oracle database. All 400 tables have only two columns as follows:

    Name                                         Null?          Type

    ----------------------------------------- -     -------         ---------------------------

    RECID A NOT NULL VARCHAR2 (255)

    XMLRECORD XMLTYPE

    Each table is NORMAL index created for her for the VARCHAR2 column:

    CREATE UNIQUE INDEX "username". "' Indexname_PK ' WE 'username '. "' table_name ' ('RECID') PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE"tbs_idx ";

    The entire table has index CLOB created home under description.

    PIECE PCTVERSION RETENTION FREEPOOLS CACHE IN_ROW FORMAT BY

    ----------             ---------          ----------             ---------- ----------          ---------    ---------------            ---

    8192 14400 YES YES NO ENDIAN NEUTRAL

    Informatica questions under query on the entire table, where he could just fetch only 400rows/s in average. It takes the day whole buisness to complete the batch for all 400 tables, which gives a big problem in the production environment.

    SELECT < table_name >. < nom_de_colonne >. < table_name > getclobval();

    SQL > select * from v version $;

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE Production 10.2.0.5.0
    AMT for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - production
    NLSRTL Version 10.2.0.5.0 - Production

    Necessary details:

    1. where do you see in this scenario, there is a problem that is blocking the performance?

    2. what type of index on this configuration is normally advisable?

    Thanks a lot for your help.

    For storage of XMLType relational object works, you would need an XML schema. According to the XML schema, the works of art/storage of XMLType will be created.

    Be aware, but you're probably aware of this, Oracle 10.2 is a version of database desupported (also no extended support is available).

Maybe you are looking for