attempts to cancel the query discoverer - it takes long time to cancel...

Hello world

I cancelled a beak of query. It took a long time to run

Now it takes a long time to cancel

The admin is out to lunch...

all advice, pls, thx, sandra

Hi, Sandra
In general, the reason for the cancellation of a query is that it has worked too long - right?

Behind the scenes, one of two things happening, either:

1. the request was to have a hard time finding data and is always looking, or
2. the query found some data but not enough to satisfy the query governor parameters

For these, depending on the amount of data has so far been recovered, discoverer must these data somewhere. This is called a cache. The data you put in a cache more must be allowed to come out it should you decide not to go forward. This is probably what has happened to you.

Also, when you cancel a query you are generally posed a question about whether discoverer must keep the last change but does not return any data. If you click Yes in response to this question is usually what triggers the compensation of the cache. Most of the time I just click No, even if I made a little change. I tend to get my quick return query.

Finally, if your discoverer worksheet is a crosstab or use Page elements, or even both at the same time, it is one of the causes of a long-running query. In these scenarios, discoverer has buckets to calculate and he has no idea how many buckets to until he has read all the data.

My Discoverer 10 g manual and in my training I speak on the motion of The Twilight Zone. These are queries than ever or never looks back all the data and either expire or must be stopped manually. Sometimes these runaway queries trying to return each row of data in the database, but more generally, they are caused by the use of overcasual of page elements or tables double entry.

Let us hope that this logbook help
Best wishes
Michael

Tags: Business Intelligence

Similar Questions

  • display accessor query runs for a long time with parameters null - JDEV 11.1.2.3

    I use Jdev 11.1.2.3.


    I have inputVO with the query as

    Select "store", as a double.

    The VO store attribute, I have inputlistofvalues that comes from storesLOVVO, which the query is like

    Select store_name, store_id from all_stores.

    Now I drag store to inputVO on the page of the user interface as inputListofValue. The user selects the value and runs the page and everything goes as you wish and in no time at all.

    Now the user manually removes the selected value from the store of the user interface and clicks a button to deal with something. But instead of calling the method that is present on the actionlistener for this method, the query of storesLOVVO runs on the server (I can see in the newspapers) for a very long time with store_name as null as a condition.

    If I run this query in SQL developer, it gives results in 0.02 sec, even with store_name as null clause added.

    Why jdev performs this LOV VO when there is no parameters?

    And if she runs the VO, why are so slow... its almost take 2 minutes and then the rest of the processing occurs.

    Yet,.

    Take a look at this to see if it helps: Andrejus Baranovskis Blog: anti-patterns ADF: dangerous tutorials - a real experience in the ADF

  • Vista has stopped turning the games run for a long time.

    Vista has stopped turning the games run for a long time. The display would go crazy and the sytem would lock. Gotta make a stop with the power button. No errors are recorded. I re-installed the game. Same thing. I reinstalled Vista 64. Same thing. I get about 3 minutes in the game and then locking the. 1 single game still work (BioShock2). COD - MW2 and COD MW lock the sytem. One is direct install, and the other is the steam. I have a video card Nvidia GTX 280 with the latest drivers from Microsoft. Before the reinstall, I tried to install the most recent NVIDIA. Did not help. Yet the locks without showing error. About half of the time it stops at my off video card a few seconds after that the display goes crazy. BioShock uses DirectX 10, and others use DirectX 11. I read on some sites that 11 causes the video crashes on some systems. I want to know is why 11 is working for so long and stop NOW. Is there a way to make the games all run on 10? COD BlackOPS crashes too. I played ALL these games over and over again until the last 3 weeks. If there was some error to post logs I would but there is not. Any suggestions on where to find some kind of problem that could cause this? The video card was removed, cleaned and put back into the computer. Still crashes. 1 in 4 of the games will take place without any problems. 3 will be blocking of the computer and the video trash in 3 minutes or less to start the game. The video is great, until blocking.

    Suggestions on how to fix or where to additional troubleshooting for the cause will be greatly appreciated.

    Try running the memory and the hard drive scan to make sure that both are good.
    http://Windows.Microsoft.com/en-us/Windows7/diagnosing-memory-problems-on-your-computer
    http://Windows.Microsoft.com/en-us/Windows7/check-a-drive-for-errors

    If both check good, the map may be at fault. In which case it is overheating you can manually increase the fan speed in the Nvidia Control Panel.

  • Variable code bind takes longer time to complete?

    Hello, my database is oracle11g.

    I have same code plsql and the first is without bind variable and is second with bind variable. Usually the binding variable should take less time. But here
    the binding variable takes more time than the standard code... Can someone please explain why?


    SQL > alter system flush shared_pool;

    Modified system.

    SQL > declare
    2 cursor c1 is select * from emp where rownum < 50;
    3 l_start NUMBER DEFAULT DBMS_UTILITY. GET_TIME;
    number of v_cnt 4;
    5. start
    6 because me looped c1
    7. SELECT count (*) in v_cnt
    8 RATE
    9 WHERE IN (SELECT rate_id rate_id
    10 FROM ratedetail
    11 WHERE benefit_id = i.benefit_id)
    12 AND effective_date =
    13 to TO_DATE ('2011-01-23 00:00:00 ', "yyyy-MM-dd HH24:MI:SS")
    14 AND rate_type_id = 1;
    15 end loop;
    16 DBMS_OUTPUT. Put_line ('total minutes...' |) ROUND (ROUND ((DBMS_UTILITY. GET_TIME - l_start) / 100, 2)
    ((/ 60,3));
    end 17;
    18.
    total number of minutes... 06

    PL/SQL procedure successfully completed.

    SQL > alter system flush shared_pool;

    Modified system.

    SQL >
    SQL > declare
    2 cursor c1 is select benefit_id from emp where rownum < 50;
    3 l_start NUMBER DEFAULT DBMS_UTILITY. GET_TIME;
    number of v_cnt 4;
    5. start
    6 because me looped c1
    7 execution immediate 'SELECT count (*)
    8 RATE
    9 WHERE IN (SELECT rate_id rate_id
    10 FROM ratedetail
    11 WHERE benefit_id =: x)
    12 AND effective_date = trunc (sysdate)-202
    13 AND rate_type_id = 1'
    14 in v_cnt using i.benefit_id;
    15 end loop;
    16 DBMS_OUTPUT. Put_line ('total minutes...' |) ROUND (ROUND ((DBMS_UTILITY. GET_TIME - l_start) / 100, 2)
    ((/ 60,3));
    end 17;
    18.
    total number of minutes... 061

    PL/SQL procedure successfully completed.

    SQL >

    You are totally confused.
    If a statement using bind variable is executed several times, it will only be parsed first.

    Here is an example of not using bind variables

    Select ename
    WCP
    where empno = 10;

    Select ename
    WCP
    where empno = 20;

    Oracle is two different statements will review and analyze the two of them.

    Comes in cursor_sharing = force

    Now the two statements will be, behind the scenes
    is converted to
    Select ename
    WCP
    where empno =: b1;

    Only 1 analysis.

    Cursor_sharing = force is a very rude to reduce the analysis.

    When you use bind variables, not analytical, and you re - use the execution plan, which is not generated again.

    HTH
    ------------------------
    Sybrand Bakker
    Senior Oracle DBA

  • attempts to display the query results in 2 columns

    I'm trying to change someone elses existing of code to display the results of a query in 2 columns on a web page.

    The result of the existing code can be seen
    here

    Here is the code I am trying to change

    < table width = "95%" border = "0" align = "center" cellpadding = "4" cellspacing = "2" >
    < cfoutput query = "News" StartRowOptional = "" #StartRow_News # "LignesMax =" #MaxRows_News #">"
    < tr align = "center" class = "TEXTnormal" >
    < class nowrap = "style1 TEXTnormal" td >... < table >
    < /tr >
    < class tr = "TEXTnormal" >
    < td > < table width = "100%" border = "0" cellpadding = "0" cellspacing = "0" class = "TEXTnormal" >
    < b >
    < td > < cfif News.ImageNameThumb gt 0 >
    "< a href =" news_view.cfm? recordID = #News.ID #"> < img src =" "uploadedimages / #News.ImageNameThumb #" alt = "#News.ImageCaption #" hspace = "8" hspace = "0" border = "0" align = "left" > < / has >
    < cfelse >

    < / cfif > < table >
    < td > < a href = "" news_view.cfm? recordID = #News.ID # "class ="TEXThighlight"> #News.Title # < /a > - #News.Day #. #News.Month #. #News.Year # < br >"
    #News.Summary # < table >
    < /tr >
    < / table > < table >
    < /tr >
    < / cfoutput >
    < /table >

    I changed the above code to

    < table width = "95%" border = "0" align = "center" cellpadding = "4" cellspacing = "2" >
    < cfset LoopEndRow = CEILING(#EndRow_News#/2) >
    < cfloop
    index = "row".
    from = "#StartRow_News #
    to = "#LoopEndRow #
    step = "1" >
    < class tr = "TEXTnormal" >
    < cfset breaker = 0 >
    < cfloop
    index = "column".
    from = '0 '.
    to = '2 '.
    step = "1" >
    < cfoutput query = "News1" StartRowOptional = "" #StartRow_News # "LignesMax =" #MaxRows_News #">"
    < td width = "50%" >
    < table width = "100%" border = "0" cellpadding = "0" cellspacing = "0" class = "TEXTnormal" >
    < b >
    < td > < cfif News1.ImageNameThumb gt 0 >
    "< a href =" news_view.cfm? recordID = #News1.ID #"> < img src =" "uploadedimages / #News1.ImageNameThumb #" alt = "#News1.ImageCaption #" hspace = "8" hspace = "0" border = "0" align = "left" > < / has >
    < cfelse >

    < / cfif > < table >
    < td > < a href = "" news_view.cfm? recordID = #News1.ID # "class ="TEXThighlight"> #News1.Title # < /a > - #News1.Day #. #News1.Month #. #News1.Year # < br >"
    #News1.Summary # < table >
    < /tr >
    < / table > < table >
    < cfset breaker breaker + 1 = >
    < cfif breaker EQUAL 2 >
    < cfbreak >
    < / cfif >
    < / cfoutput >
    < / cfloop >
    < /tr >
    < / cfloop >
    < /table >

    The results of this code change can be see here

    as you can see what I did gives the number of columns (2)
    and the correct number of lines for the amount of data (3)
    However, each line shows the first 2 pieces of data returned by the query

    Can I change the output query so that it returns the data SET by the amount of data already out items?
    If so, how?



    #data #.




    closing tags

  • SELECT the view doesn't take long, short definition - no difference in execplans

    [Plans Execuion | http://misc.adammuller.sk/execplan.png]

    Hello

    I have a strange problem and I ran out of ideas already.
    I have a fairly complex vision that selects about 10 long tables (about 4 M records each) and the id of customer pre build a "sentence of customer. I always get only one line from this point of view, for example. Select * from my_view where party_id = XYZ. I will NEVER select the whole view.

    The problem is that running a query:
    Select * from my_view where party_id = XYZ really time consuming, while putting party_id = XYZ condition directly in the view runs in 0.0 seconds.

    After putting a FIRST_ROWS hint (1) ORDERED in a view, the execution plans seems to be the same (or very similar) to the two motions. Unfortunately, I can't transfer anything the screenshot of the environment - this is why I stick plans exec as the screenshots only - pls, follow the link: http://misc.adammuller.sk/execplan.png

    Any help is greatly appreciated. Version of DB is 11.2.0.1.0.

    View DDL:
    create or replace view my_view as
    select /*+ ORDERED FIRST_ROWS(1) */  pt.party_id
               pt.party_id as id_klienta_mdm,
               pt.master_reference_no as id_klienta_ref_mdm,
               pt.client_type as fo_po,
               pt.prim_id as rodne_cislo_ico,
               pt.c_sid as sid,
               case pt.client_type when f_get_param('CLIENT_TYPE_PRIVATE_INDIVIDUAL') then 1 else 0 end as fi_info_klient_fo,
               1 as fi_meno_klienta,
               pt.p_title_prefix as titul_pred,
               pt.p_first_name as meno,
               pt.p_last_name as priezvisko,
               pt.p_title_suffix as titul_za,
               pt.p_nationality as statna_prislusnost,
               doc.document_type as druh_dokladu,
               doc.document_number as cislo_dokladu,
               pt.p_birth_date as datum_narodenia,
               pi.place_of_birth as miesto_narodenia,
               f_gender2bis(pt.p_gender) as pohlavie,
               case pt.client_type when f_get_param('CLIENT_TYPE_CORPORATE') then 1 else 0 end as fi_info_klient_po_mdm,
               case pt.client_type when f_get_param('CLIENT_TYPE_CORPORATE') then 1 else 0 end as fi_info_klient_po,
               pt.c_name as nazov,
               pt.c_name_short as skr_nazov,
               nico.identification_value as nico,
               corp.sector as sektor,
               corp.nace_code as odvetvie,
               corp.ownership_type as vlastnictvo,
               pt.c_legal_form as pravna_forma,
               pt.c_foundation_date as datum_zalozenia,
               substr(corp.registration_docu_type, 40) as doklad,
               corp.vat_payer as platca_dph,
               corp.tax_office_no as cislo_du,
               corp.accounting_type as uctovnictvo,
               corp.deposit_protection as ochrana_vkladov,
               corp.asset_amount as zakladne_imanie,
               to_number(corp.finantial_situation) as financna_situacia,
               to_number(corp.reporting_period) as periodicita_vykazov,
               corp.first_report_date as datum_vykazu_prvy,
               corp.last_provided_report_date as datum_vykazu_posledny,
               exe.execution_type,
               case when exe.execution_type is null then 0 else 1 end as v_likvidacii,
               exe.valid_from as v_likvidacii_od,
               1 as fi_info_profil,
               prof.business_allowance as zvyhodnenie,
               dic.identification_value as dic,
               null as marketing,
               null as prilohy_emailu,
               prof.aml_level as stupen_rizika,
               prof.relation_to_bank as vztah_k_banke,
               prof.client_category as kategoria,
               substr(pt.remark, 160) as poznamka,
               null as tuzemec,
               pt.tax_domicile as domicil,
               case when trvala.address_id is null then 0 else 1 end as fi_trvala_adresa,
               trvala.street_name_short as trvala_adresa_ulica,
               trvala.city_short as trvala_adresa_mesto,
               trvala.zip as trvala_adresa_psc,
               trvala.state as trvala_adresa_stat,
               case when prechodna.address_id is null then 0 else 1 end as fi_prechodna_adresa,
               prechodna.street_name_short as prechodna_adresa_ulica,
               prechodna.city_short as prechodna_adresa_mesto,
               prechodna.zip as prechodna_adresa_psc,
               prechodna.state as prechodna_adresa_stat,
               1 as fi_kontakt_klienta,
               tel1.contact_value as tel_cislo1,
               tel2.contact_value as tel_cislo2,
               fax.contact_value as fax_cislo,
               email.contact_value as email,
               email.contact_value as modem, -- ano, naschval posielam do modemu email
               prof.pref_service_point as kontaktne_miesto
          from ucd.party pt
     left join ucd.party_identification nico
            on nico.party_id = pt.party_id and nico.identification_type = f_get_param('CLIENT_ID_TYPE_NICO')
           and trunc(sysdate) between nvl(nico.valid_from, to_date('1900', 'YYYY')) and nvl(nico.valid_until, to_date('2900', 'YYYY'))
     left join ucd.party_identification dic
            on dic.party_id = pt.party_id and dic.identification_type = f_get_param('CLIENT_ID_TYPE_DIC')
           and trunc(sysdate) between nvl(dic.valid_from, to_date('1900', 'YYYY')) and nvl(dic.valid_until, to_date('2900', 'YYYY'))
     left join ucd.party_profile prof
            on prof.party_id = pt.party_id
     left join ucd.party_corp corp
            on corp.party_id = pt.party_id
     left join ucd.party_pi pi
            on pi.party_id = pt.party_id
     left join ucd.party_corp_execution exe
            on exe.party_id = pt.party_id
           and trunc(sysdate) between nvl(exe.valid_from, to_date('1900', 'YYYY')) and nvl(exe.valid_until, to_date('2900', 'YYYY'))
           and exe.execution_type = f_get_param('EXECUTION_TYPE_LIKVIDACIA')
           and rownum = 1
     left join ucd.address trvala
            on trvala.party_id = pt.party_id
           and trvala.address_type = f_get_param('ADDRESS_TYPE_PERMANENT')
     left join ucd.address prechodna
            on prechodna.party_id = pt.party_id
           and prechodna.address_type = f_get_param('ADDRESS_TYPE_SUBSIDIARY')
     left join (select party_id, document_type, document_number,
                       rank() over (partition by party_id order by document_type asc, issue_date desc, document_number desc nulls last) as rank
                  from ucd.document
                 where status = f_get_param('STATUS_ACTIVE')) doc
            on doc.party_id = pt.party_id
           and doc.rank = 1
     left join ucd.contact tel1
            on tel1.party_id = pt.party_id
           and tel1.contact_category = f_get_param('CONTACT_CATEGORY_TEL')
           and tel1.contact_subcategory = f_get_param('CONTACT_SUBCATEGORY_TEL_PRIMARNY')
     left join ucd.contact tel2
            on tel2.party_id = pt.party_id
           and tel2.contact_category = f_get_param('CONTACT_CATEGORY_TEL')
           and tel2.contact_subcategory = f_get_param('CONTACT_SUBCATEGORY_TEL_SEKUNDARNY')
     left join ucd.contact fax
            on fax.party_id = pt.party_id
           and fax.contact_category = f_get_param('CONTACT_CATEGORY_FAX')
           and fax.contact_subcategory = f_get_param('CONTACT_SUBCATEGORY_FAX_NA')
     left join ucd.contact email
            on email.party_id = pt.party_id
           and email.contact_category = f_get_param('CONTACT_CATEGORY_EMAIL')
           and email.contact_subcategory = f_get_param('CONTACT_SUBCATEGORY_EMAIL_PRIMARNY')
     where pt.tec_active_rec = f_get_param('TEC_ACTIVE_FLG_ACTIVE')
       and pt.source_system = f_get_param('SOURCESYSTEM_MDM')
    Published by: adammsvk on 16.8.2012 23:34

    Edit:
    I managed to get around this by adding
    and pt.party_id = SYS_CONTEXT ('cx_cs', 'party_id')
    and defining the context before selecting view in a package (this is the only package selected from this point of view) but there is a very very dirty, I do not have much

    Published by: adammsvk on 16.8.2012 23:51

    Published by: adammsvk on 20.8.2012 0:57
    Discover DDL added around barcode labels

    If please repeat your post and was able to add tags to code around it
    as in
    {code}

      select * from dual;
    

    {code}

    Now to your problem.
    I think that this use of rownum is a bug.
    Sometimes it might work, but sometimes not. It can also be a reason for the problem you describe.

    ...
    left join ucd.party_corp_execution exe
        on exe.party_id = pt.party_id
        and trunc(sysdate) between nvl(exe.valid_from, to_date('1900', 'YYYY')) and nvl(exe.valid_until, to_date('2900', 'YYYY'))
        and exe.execution_type = f_get_param('EXECUTION_TYPE_LIKVIDACIA')
        and rownum = 1 "do not use rownum in such a way!"
    

    This use of rownum could be one of the reasons why the filter do not spread into the inner query.

    Test what happens if you remove this join the query completely.

  • Using the query - amount weekly, daily, max &amp; time

    Hi guys,.

    I came looking for help with this query, I should use to create a new table. At first I just thought I needed to store the weekly amount and some other information, but then told me that I need the sum for the week and the hourly figure higher this week with time. I managed to make all columns except rush hour causing me issues.

    The DESC table is as follows: http://i38.tinypic.com/8yt0.png

    My query result has need of the following:
    Db_name (direct copy of the table)
    TYPE (direct copy of the table)
    YEAR (cropped from TD_HR - first 4 characters)
    WEEK (cropped from TD_HR and then converted to the IW format)
    TOTAL (weekly column TOTAL amount)
    HOURLY_PEAK (the largest AMOUNT for a given time during a week)
    PEAK_TIME (time of the highest sum for the week)

    I have everything show except PEAK_TIME. Sample data:
    DB_NAME     TD_HR             TOTAL   TYPE
    CSAHEPA     2008-07-24 16     35     CON
    CSAHEPA     2008-07-24 15     4     CON
    CSAHEPA     2008-07-24 16     19     CON
    CSAHEPA     2008-07-24 17     3651     CON
    CSAHEPA     2008-07-24 16     7     CON
    CSAHEPA     2008-07-24 17     113     CON
    CSAHEPA     2008-07-24 17     534     CON
    CSAHEPA     2008-07-24 17     289     CON
    CSAHEPA     2008-07-24 17     12     CON
    CSAHEPA     2008-07-24 16     52     CON
    My current (terribly inefficient) query is the following:
    select DB_NAME, YEAR, WEEK, sum(SUM), TYPE, sum(WEEKLY_PEAK) from (
    select DB_NAME, SUBSTR(TD_HR, 1, 4) year, to_char(to_date(SUBSTR(TD_HR, 1, 10), 'RRRR-MM-DD'), 'IW') week, sum(TOTAL) sum, TYPE, 0 WEEKLY_PEAK
    from CORCON01_HOUR_CHG_TOTALS
    group by DB_NAME, SUBSTR(TD_HR, 1, 4), to_char(to_date(SUBSTR(TD_HR, 1, 10), 'RRRR-MM-DD'), 'IW'), TYPE
    union all
    select db_name, year, week, 0 sum, type, max(peak) weekly_peak from (
    select DB_NAME, SUBSTR(TD_HR, 1, 4) year, to_char(to_date(SUBSTR(TD_HR, 1, 10), 'RRRR-MM-DD'), 'IW') week, TYPE, sum(total) peak, CONCAT(INITCAP(TO_CHAR(TO_DATE(rpad(td_hr, 10),'yyyy-mm-dd'),'dy')), substr(td_hr,11))||':00' peak_time
    from CORCON01_HOUR_CHG_TOTALS
    group by DB_NAME, SUBSTR(TD_HR, 1, 4), to_char(to_date(SUBSTR(TD_HR, 1, 10), 'RRRR-MM-DD'), 'IW'), TYPE, CONCAT(INITCAP(TO_CHAR(TO_DATE(rpad(td_hr, 10),'yyyy-mm-dd'),'dy')), substr(td_hr,11)))
    group by db_name, year, week, type)
    group by db_name, year, week, type
    The final column data are given in the 2nd query here as:
    CONCAT (INITCAP (TO_CHAR (TO_DATE (rpad (td_hr, 10), "yyyy-mm-dd"), "dy")), substr(td_hr,11)) |': 0 0' peak_time
    Any help (get the last column included and/or improvement of the effectiveness of the query) is greatly appreciated.

    Mike

    This?

    with  results as (select db_name,
                             to_date(td_hr, 'yyyy-mm-dd hh24') td_hr,
                             total,
                             type
                      from   CORCON01_HOUR_CHG_TOTALS),
    final_results as (select db_name,
                             td_hr,
                             type,
                             sum(total) sum_total
                      from   results
                      group by db_name,
                               td_hr,
                               type)
    select db_name,
           to_char(td_hr, 'yyyy') year,
           to_char(td_hr, 'iw') week,
           type,
           sum(sum_total) week_sum_total,
           max(sum_total) peak_sum_total,
           to_char(max(td_hr) keep (dense_rank first order by sum_total desc), 'yyyy-mm-dd hh24') peak_hour
    from   final_results
    group by db_name,
             to_char(td_hr, 'yyyy'),
             to_char(td_hr, 'iw'),
             type;
    
    DB_NAME          YEAR WEEK TYPE       WEEK_SUM_TOTAL PEAK_SUM_TOTAL PEAK_HOUR
    ---------------- ---- ---- ---------- -------------- -------------- -------------
    CSAHEPA          2008 30   CON                  4716           4599 2008-07-24 17
    CSAHEPA          2008 39   CON                   611            555 2008-09-24 16
    

    (And why, oh why, you store your dates as VARCHAR2?) ({noformat} * sobs * {noformat})

  • The black areas of the image appear curiously in the file opened for a long time

    There's probably a simple explanation, but if I have a file open in Photoshop for a long time blacks will start appearing saturated/blocked upward. If I close and reopen the file, it looks normal again.

    Anyone know what causes this and how to prevent it?

    I use OS X Lion, Photoshop 5, Apple Cinema display 30 ''. My monitor is calibrated by X-Rite i1 display and resets according to amibent light.

    Thank you.

    Try to disable the ambient light of the i1 function and see if that helps.

  • Create the accounting working for a long time program

    Hi hussein.


    Our 'create accounting' program is now strange. We running for a long time. In my view, he hit a data of the exception or blocking.
    I run perfstat to trace the problem?


    Thank you very much

    Hello

    Please refer to (Note: 453527.1 - how to Trace a competitor ask and generate TKPROF file).

    Kind regards
    Hussein

  • Nested set tables in select query "in the clause of" take long time

    create or replace type t_circuitids is table of the varchar2 (100);

    -Under anonymous block continues to run away and never ends

    DECLARE
    v_circuitid t_circuitids;
    number of v_count;
    l_circuitids VARCHAR2 (4000)
    : = "Value1, value2, value3, value4, Value5";
    BEGIN
    -Query below converts the output concatinated with commas to the list and stores it in the nested table collection v_circuitids
    WITH an ACE
    (SELECT ',' | l_circuitids |) ',' AS circuitid
    THE DOUBLE)
    SELECT DISTINCT TRIM (SUBSTR (circuitid,
    INSTR (circuitid, "," 1, LEVEL) + 1.
    INSTR (circuitid, "," 1, LEVEL + 1)
    -INSTR (circuitid, "," 1, LEVEL)
    -1
    )
    ) cid
    LOOSE COLLECTION v_circuitid
    A
    CONNECT BY LEVEL <
    LENGTH (circuitid)
    -LENGTH (REPLACE (circuitid, ','));

    SELECT COUNT (1)
    IN v_count
    TABLE
    WHERE name IN (SELECT COLUMN_VALUE
    TABLE (v_circuitid));
    END;
    /

    -I had the question, query "SELECT COLUMN_VALUE FROM TABLE (v_circuitid)" that is used in code above is responsible for this.

    -Same code works fine in development and Test environments, but prod it continues to work on

    -I solved this problem by creating a temporary table, loading of all values in the collection in the temporary table and using this temporary table "in the clause" "

    -Can answer why his behavior like this when I use the collection where clause?

    -I use Oracle 9i

    Here is a summary of the question and the solution for this.

    -Nested type to collect multiple values

    CREATE or REPLACE the TYPE t_circuitid IS TABLE OF VARCHAR2 (100);

    Below the code will simply on the run.

    DECLARE
    v_circuitid t_circuitid;
    v_count NUMBER;
    BEGIN
    SELECT nal_name
    LOOSE COLLECTION v_circuitid
    OF fs_head
    WHERE groupid = 10;

    SELECT COUNT (1)
    IN v_count
    OF fs_attrib
    WHERE NAME IN (SELECT COLUMN_VALUE
    TABLE (v_circuitid));

    Dbms_output.put_line (v_count);
    END;
    /

    Cause:-SELECT COLUMN_VALUE TABLE (v_circuitid)); -This request is causing problem

    Why?  : - Because the CBO does not know how many lines is present in the collection, by default it takes 8168 lines

    Note:-always happens, it depends on the volume of data in the table, the path chosen by CBO. In my case, the table is huge on prod compared to DEV so he was causing a problem.

    -The following modified code works very well

    DECLARE
    v_circuitid t_circuitid;
    v_count NUMBER;
    BEGIN
    SELECT nal_name
    LOOSE COLLECTION v_circuitid
    OF fs_head
    WHERE groupid = 10;

    SELECT COUNT (1)
    IN v_count
    OF fs_attrib
    WHERE NAME IN (SELECT / * + cardinality (20 t) * /)
    COLUMN_VALUE
    TABLE (v_circuitid) t);

    Dbms_output.put_line (v_count);
    END;
    /

    Solution:-used as cardinality hint below.

    SELECT / * + cardinality (20 t) * / t COLUMN_VALUE TABLE (v_circuitid);

    Using cadinality I am saying CBO which dataset contains 20 lines or less.

    If it is version of Oracle 10 g and more, we can use below code (CARD utility).

    SELECT COLUMN_VALUE TABLE (CARD ((v_circuitid))

    For more information reach me at [email protected]

    Thank you best regards &,.

    Amarnath a. Reddy.

  • I get this message when you try to start the firefox4 Script: chrome://tavgp/content/libs/include.js:595 and after clicking on ok, it takes long time for firefox open

    When I click on the firefox icon, the minutes pass and this is displayed: WARNING: unresponsive script: Script: chrome://tavgp/content/libs/include.js:595. iClick continue and again, after a minute or so firefox 4 starting ithen get a message: TypeError: components.classes['@ [cid] is undefined

    It is a problem with the AVG Safe Search toolbar.

    See:

  • attempts to send the message that is too long the Outbox - it freezes and does not allow me to delete

    Outbox is trying to send a message too long - can not remove it it freezes and does not

    Windows Mail. Whenever I try to go to the Outbox to erase the messages it freezes the computer.  I even went to tools and checked 'work offline' and it seems to ignore it.

    Follow this article help & Support:
    http://support.Microsoft.com/kb/941090

    t-4-2

  • I just bought the Officejet Pro 8600 more. The sprint is all set up. But it takes long time

    between the sending to print and actually printing the file. Is there a way to speed it up?

    The printer is now connected to the computer via a wireless connection. The scanner works fine and report may be the printer from the printer LCD display. After completing all of the proposed tests now the printer reacts much more quickly. Maybe it's because I turned off the printer and turn it back on and the printer has been reset correctly print wireless. Thanks for the help.

  • Pavilion 10 TS F3F15UA #ABA: HP Pavilion 10 TS Notebook PC takes long time to start and does not

    I used the Windows Moviemaker app and suddenly the system became unstable and very slow. I tried to reboot several times. It takes about 15 minutes to restart the desktop and there is practically no response at all when I try to do anything on the machine. I am able to get Task Manager up and it shows 100% use of the disk.

    Should what steps I take to diagnose the problem?

    I'm tired of doing these steps on a computer that has worked less than 1% of the time so I just restored it from scratch and it seems to be ok now. I lost everything I had on this subject, but I can recreate it all by downloading things I need from the internet. Even make that a backup did not work as hard disk access was extremely slow or not available at all.

    Thanks for the help.

  • My computer windows hp laptop Pavilion 8 takes long time to log in, why?

    Should I just turn off my laptop and start again or wait until it connects me to, but I don't know that it will be. He's been stuck on this welcome load when I login.

    Hi Daisycp,

    Welcome to the Forums of HP Support!

    I understand that your HP Pavilion computer is not boot up after the HP logo screen. I'll try my best to help you with this problem. To better orient, you please can you me the complete laptop computer model number and the operating system that runs on it. Here are a few guides for How can I find my model number or product number? and Windows operating system am I running?.

    In the meantime, here's a document to test a hard drive in the BIOS see if your hard drive is working properly.

    I hope that this helps, please let me know how it goes.

    Thank you and have a great day!

Maybe you are looking for

  • Safari freezes on some sites

    It was launched recently, perhaps just after I upgraded to Mac OS sierra. When I open some site like github.com, pypi.python.org, other, Safari hangs for a 5 seconds or more and shows the spinning ball. If I open another tab and return to the tab of

  • Shape masks makes a different size while sharing!

    I have some masks of form that seems to be perfect in size, but when I share my project they seems in aprox. 50% of the size, the whole makes very well. I found that if I convert forms in points, while they go to the right size. Any idea? Thank you!

  • New digital camera will not work on this computer

    I bought a new digital camera, but it won't work on this computer, it claims to be compatible, help!

  • Y50 external microphone does not work do not

    Bought the Y50 because it is decent spec for video editing (which works well), but - can not get the external microphone to work. Tried a headphones/mic adapter. Tried all the different settings in Realtek HD Audio Manager I tried Control Panel / its

  • Sequencing of socket

    Hello I use TestStand 2010 to sequence the test software. I use the process model of batch for the validation of several units. My requirement is to run taking 0 first and Socket 1 next etc... But unfortunately I'm not able control of catches in orde