BIBean poor performance when using Query.setSuppressRows()

Does anyone have experience in suppressing N/A cell values using BIBean? I was experimenting the use of Query.setSuppressRows(DataDirector.NA_SUPPRESSION). It does hide the rows that contains N/A values in a crosstab.
The problem is that the performance degrades significantly when I started drilling down the hierarchy. Without calling the method, I was able to drill into the pre-aggregated hierarchy in a few seconds. But with setSuppressRows(), it took almost 15 minutes to do the same drill.
Just for a comparison, I used DML to report on the same data that I wanted to drill into. With either 'zerorow' to yes or no, the data was fetched less than a second.
Thanks for any help.
- Wei

At the moment we are hoping this will be fixed in a 10g database patch which is due early 2005. However, if you are using an Analytic Workspace then you could use OLAP DML to filter the zero and NA rows before they are returned to the query. I think this involves modifying the OLAP views that return the AW objects via SQL commands.
Hope this helps
Business Intelligence Beans Product Management Team
Oracle Corporation

Similar Messages

  • Poor performance when using kde desktop effect

    Hey,
    I'm having trouble when using kde effet (system settings -> desktop -> desktop effects).
    I have a dual core E5200 3 ghz, 2 GB memory pc8500 and an HD4850 using fglrx driver, but I got incredible bad performance when using desktop effect and watching video, I can barely watch a 800x600 video in full screen mode without having bad performance, X getting up to 40% cpu usage.
    Its really like my graphic card isnt handling the rendering stuff but 3D acceleration is working, I can play 3D game without problem so far (as long as the deskstop effect arent enabled cause the cpu have like a hard time handling both for recent game)
    So I guess its some trouble with 2D acceleration or something like that, I read that some people had such issue, but I didnt figure a way to fix it.
    Here is my xorg.conf, in case something is wrong with it :
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "aticonfig-Screen[0]-0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    EndSection
    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    FontPath "/usr/share/fonts/TTF"
    FontPath "/usr/share/fonts/Type1"
    EndSection
    Section "Module"
    Load "dri2"
    Load "extmod"
    Load "dbe"
    Load "record"
    Load "glx"
    Load "dri"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "Monitor"
    Identifier "aticonfig-Monitor[0]-0"
    Option "VendorName" "ATI Proprietary Driver"
    Option "ModelName" "Generic Autodetecting Monitor"
    Option "DPMS" "true"
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "ShadowFB" # [<bool>]
    #Option "DefaultRefresh" # [<bool>]
    #Option "ModeSetClearScreen" # [<bool>]
    Identifier "Card0"
    Driver "vesa"
    VendorName "ATI Technologies Inc"
    BoardName "RV770 [Radeon HD 4850]"
    BusID "PCI:8:0:0"
    EndSection
    Section "Device"
    Identifier "aticonfig-Device[0]-0"
    Driver "fglrx"
    BusID "PCI:8:0:0"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
    Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device "aticonfig-Device[0]-0"
    Monitor "aticonfig-Monitor[0]-0"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
    Thank you for any help.

    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
    ### [arg]: arg optional
    #Option "ShadowFB" # [<bool>]
    #Option "DefaultRefresh" # [<bool>]
    #Option "ModeSetClearScreen" # [<bool>]
    Identifier "Card0"
    Driver "vesa"
    VendorName "ATI Technologies Inc"
    BoardName "RV770 [Radeon HD 4850]"
    BusID "PCI:8:0:0"
    EndSection
    and
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    I see no reason for those to be there.
    make a backup of your xorg.conf and remove / comment those lines.

  • Is anyone able to explain really poor performance when using 'If Exists'?

    Hello all.  We've recently had a performance spike when using the 'if exists' construct, which is a construct that we use through much of our code.  The problem is, it appears illogical since if can be removed via a tiny modification that does
    not change the core code.
    I can demonstrate  
    This is the (simplified) format of the base original code.  It's purpose is to identify when a column value has changed comparing to a main table and a complex view
    select 1 from MainTable m
    inner join ComplexView v on m.col2 = v.col2
    where m.col3 <> v.col3
    This is doing a table scan, however the table only has 17000 rows while the view only has 7000 rows.  The sql executes in approximately 3 seconds.
    However if we add the 'If Exists' construct around the original query, like such:
    if exists (
    select 1 from MainTable m
    inner join ComplexView v on m.col2 = v.col2
    where m.col3 <> v.col3
    print 1
    The sql now takes over 2 minutes to run.  Note that the core sql is unchanged.  All I have done is wrap it with 'If Exists'
    I can't fathom why the if exists construct is taking so much longer, especially since the code code is unchanged, however more importantly I would like to understand why since we commonly use this type of syntax.
    Any advice would be greatly appreciated

    OK, that's interesting.  Adding the top 1 clause greatly affects the performance (in a bad way).
    The original query (as below) still runs in a few seconds.
    select 1 from MainTable m
    inner join ComplexView v on m.col2 = v.col2
    where m.col3 <> v.col3
    The 'Top 1' query (as below) takes almost 2 minutes however.  It's exactly the same query, but with 'top 1' added to it.
    select top 1 1 from MainTable m
    inner join ComplexView v on m.col2 = v.col2
    where m.col3 <> v.col3
    I suspect that the top 1 is performing a very similar operation to the exists, in that it is 'supposed' to exit as soon as it finds a single row that satisfies it's results.
    It's still not really any closer to making me understand what is causing the issue however.

  • Poor Performance when using Question Pooling

    I'm wondering if anyone else out there is experiencing
    Captivate running very slow when using question pooling. We have
    about 195 questions with some using screenshots in jpeg format.
    By viewing the Windows Task Manager, CP is using anywhere
    between 130 to 160 K worth of memory. What is going on here? It's
    hammering the system pretty hard. It takes a large effort just to
    reposition the screenshot or even move a distractor.
    I'm running this on a 3.20GHz machine with 3GB of RAM.
    Any Captivate Gurus out there care to tackle this one?
    Help.

    MtnBiker1966,
    I have noticed the same problem. I only have 60 slides with
    43 questions and the Question Pool appears to be a big drain on
    performance. Changing the buttons from Continue to Go to next slide
    helped a little, but performance still drags compared to not using
    a question pool. I even tried reducing the number of question
    pools, but that did not affect the performance any. The search
    continues.
    Darin

  • Poor performance when using skip-level hierarchies

    Hi there,
    currently we have big performance issues when drilling in a skip-level hierarchy (each drill takes around 10 seconds).
    OBIEE is producing 4 physical SQL statements when drilling f.e. into the 4th level (for each level one SQL statement). The statements runs in parallel and are pretty fast (the database doesn't need more than 0,5 seconds to produce the result), but ... and here we have probably somewhere a problem ... putting all the 4 results together in OBIEE takes another 8 seconds.
    This are not big datasets the database is returning - around 5-20 records for each select statement.
    The question is: why does it take so long to put the data together on the server? Do we have to reconfigure some parameters to make it faster?
    Please guide.
    Regards,
    Rafael

    If you really and exclusively want to have "OBIEE can handle such queries" - i.e. not touch the database, then you had best put a clever caching strategy in place.
    First angle of attack should be the database itself though. Best sit down with a data architect and/or your DBA to find the best setup possible physically and then when you've optimized that (with regard to the kind of queries emitted against it) you can move up to the OBIS. Always try t fix the issue as close to the source as possible.

  • Poor performance when using drop down box on web report

    We are using dropdown box functionality in web reporting to allow easy selection of characteristics values. We have 4 dropdown boxes
    that represents Region, Area, Country and division.
    We need to use booked_values = 'Q' to show only relevant values for selection in the dropdown. However the issue is takes a long time for results to appear
    on the template. Read from Fact table is quick but process of deriving drop down values is very slow.
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="DROPDOWNBOX_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_FILTER_DDOWN"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="BORDER_STYLE" value="BORDER"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="IOBJNM" value="ZPC_ORG14"/>
             <param name="BOOKED_VALUES" value="Q"/>
             <param name="TARGET_DATA_PROVIDER_1" value="DATAPROVIDER_1"/>
             ITEM:            DROPDOWNBOX_1
    </object>
    Do you have any suggestions on how to improve performance on drop down?
    Thanks, Jay

    Dear Jayant Dixit,
    1) If the values in the drop down box....are NOT dependent on user selection...then webserver can send them along with the first page....and cache them on client m/c...for multiple client/server dialogs....
    2) If the values are changing based on what the user selected from a previous input......then...you need to do some research on how SAP Webserver could optimize the "network traffic"......For example: a) Apache webserver has a module that compresses the content on the webserver side and then send to the client...b)A Client browser plugin decompresses the received packet and displays appropriately....
    3) We may need to research the latest SAP webserver capabilities....
    Good luck, BB

  • Poor performance when using bind variable in report

    I have a report that takes 1 second to run if i 'hardcode' a particular value into the where clause of the report. However, if i now replace the hardcoded value with a bind variable and set the default value for the bind variable to be the (previous) hard coded value the report now takes 50 seconds to run instead of 1 second!!
    Has anyone else seen this behaviour - any suggestions to workaround this will be gratefully received

    More info
    SELECT patch_no, count(*) frequency
    FROM users_requests
    WHERE patchset IN (SELECT arps2.patchset_name
    FROM aru_bugfix_relationships abr, aru_bugfixes ab, aru_status_codes ac,
    aru_patchsets arps, aru_patchsets arps2
    WHERE arps.patchset_name = '11i.FIN_PF.E'
    AND abr.bugfix_id = ab.bugfix_id
    AND arps.bugfix_id = ab.bugfix_id
    AND abr.relation_type = ac.status_id
    AND arps2.bugfix_id = abr.related_bugfix_id
    AND abr.relation_type IN (601, 602))
    AND included ='Y'
    GROUP BY patch_no
    order by frequency desc, patch_no
    Runs < 1 sec from SQL navigator and from portal (if i hardcode the value for fampack.
    Takes ~50 secs if i replace with :fampack and set default value to 11i.FIN_PF.D

  • DOI - I_OI_SPREADSHEET, poor performance when reading more than 9999 record

    Hi,
    Please read this message in the [ABAP Performance and Tuning|DOI - I_OI_SPREADSHEET, poor performance when reading more than 9999 record; section and see if you have any advise.
    Best Regards,
    Marjo

    Hi,
    I met this issue when I tried to write vaule to massive fields of excel range.
    And I solve this issue by using CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_EXPORT.
    So, I think you may fix it in the same way.
    1. Select range in by the I_OI_SPREADSHEET
    2. Call method I_OI_DOCUMENT_PROXY->COPY_SELECTION
    3. Call method CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_IMPORT
    Cheers,

  • Poor OEL5-3 performance when using over 1Gb of RAM

    Hi, I have a Linux distribution ( Oracle Enterprise Linux 5.3 i.e. Redhat ) that I have installed. It works fine when I used 2*512Mb dimms or replace them with a single 1Gb dimm. However when I try to go above 1 Gb the bootup and general performance deteriorates badly. The BIOS picks up the memory changes ok and I am using the same type of memory sticks. It makes no difference if I load a single memory channel with the 2 sticks or balance the sticks over the 2 channels - I still get poor performance. When I return to 1Gb of RAM performance is great
    In terms of install I just followed the Oracle Release note and Readme on the DVD itself. To be honest they are incredibly basic. There does not appear to be any specific OEL 5-3 installation manual on Technet. I simply followed the prompts on scereen and choose a default install
    I have seen quite a few hits concerning problems with performance over 1Gb for Linux such as having to enable Highmem support in the kernel - however I have not seen any instruction how to check or do this - any ideas ?

    jimthompson wrote:
    Hi, I have a Linux distribution ( Oracle Enterprise Linux 5.3 i.e. Redhat ) that I have installed. It works fine when I used 2*512Mb dimms or replace them with a single 1Gb dimm. However when I try to go above 1 Gb the bootup and general performance deteriorates badly. The BIOS picks up the memory changes ok and I am using the same type of memory sticks. It makes no difference if I load a single memory channel with the 2 sticks or balance the sticks over the 2 channels - I still get poor performance. When I return to 1Gb of RAM performance is great
    In terms of install I just followed the Oracle Release note and Readme on the DVD itself. To be honest they are incredibly basic. There does not appear to be any specific OEL 5-3 installation manual on Technet. I simply followed the prompts on scereen and choose a default install
    I have seen quite a few hits concerning problems with performance over 1Gb for Linux such as having to enable Highmem support in the kernel - however I have not seen any instruction how to check or do this - any ideas ?I still might have a concern about your hardware:
    Your two 512M sticks are undoubtably well matched and live comfortably together. Hopefully they did actually use dual channel mode.
    Your 1G lives well on its own as well
    However for the greater than 1G, ie 1G + 0.5G you may be using 2 sticks that do not live well together and are causing isses with delayed response. (At worst can only 0.5G is being recognised - (use grep MemTotal /proc/meminfo if necessary to check) ). In general issues seem better with DDR2 than with earlier memory in this regard. I suppose timing with memtest86 might be an interesting metric. I must admit myself i'd prefer to use 1g+1g or even 2g + 2g (i know on 32bit I might not see it all) rather than 1g+2g or 1g+0.5g.
    Anyway what I am trying to say is that hardware should not be eliminated as a possible cause at this stage.
    Rgds - bigdelboy

  • Poor performance when Distinct and Order By Used

    Hello,
    I am getting an slow answer when I add Distinct and Order By to the query:
    Without Distinct and Order By lasts 3.57 seconds; without Distinct and Order By lasts 28.15 seconds, which it's too much for our app.
    The query is:
    select distinct CC.acceso, CC.ext_acceso, TIT.TITULO_SALIDA
    from (((Ocurrencias CT01 inner join
    palabras p0 on (CT01.cod_palabra = p0.cod_palabra and p0.palabra like 'VENEZUELA%' AND p0.campo = 'AUTOR')) INNER JOIN
    CENTRAL CC ON (CT01.ACCESO = CC.ACCESO AND CT01.EXT_ACCESO = CC.EXT_ACCESO))) inner join
    codtit ctt on (CC.acceso = ctt.acceso and CC.ext_acceso = ctt.ext_acceso) inner join
    titulos tit on (ctt.cod_titulo = tit.cod_titulo and ctt.portada = '1')
    where CC.nivel_reg <> 's'
    ORDER BY 3 ASC;
    The query plan for the query WITH Distinct and Order By is:
    Elapsed: 00:00:28.15
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=301 Card=47 Bytes=12220)
    1 0 SORT (ORDER BY) (Cost=301 Card=47 Bytes=12220)
    2 1 SORT (UNIQUE) (Cost=300 Card=47 Bytes=12220)
    3 2 NESTED LOOPS (Cost=299 Card=47 Bytes=12220)
    4 3 NESTED LOOPS (Cost=250 Card=49 Bytes=4165)
    5 4 NESTED LOOPS (Cost=103 Card=49 Bytes=2989)
    6 5 NESTED LOOPS (Cost=5 Card=49 Bytes=1960)
    7 6 TABLE ACCESS (BY INDEX ROWID) OF 'PALABRAS' (TABLE) (Cost=3 Card=1 Bytes=19)
    8 7 INDEX (RANGE SCAN) OF 'PALABRA' (INDEX (UNIQUE)) (Cost=2 Card=1)
    9 6 INDEX (RANGE SCAN) OF 'PK_OCURRENCIAS' (INDEX (UNIQUE)) (Cost=2 Card=140 Bytes=2940)
    10 5 TABLE ACCESS (BY INDEX ROWID) OF 'CENTRAL' (TABLE) (Cost=2 Card=1 Bytes=21)
    11 10 INDEX (UNIQUE SCAN) OF 'PK_CENTRAL' (INDEX (UNIQUE)) (Cost=1 Card=1)
    12 4 TABLE ACCESS (BY INDEX ROWID) OF 'CODTIT' (TABLE) (Cost=3 Card=1 Bytes=24)
    13 12 INDEX (RANGE SCAN) OF 'PK_CODTIT' (INDEX (UNIQUE)) (Cost=2 Card=1)
    14 3 TABLE ACCESS (BY INDEX ROWID) OF 'TITULOS' (TABLE) (Cost=1 Card=1 Bytes=175)
    15 14 INDEX (UNIQUE SCAN) OF 'PK_TITULOS' (INDEX (UNIQUE)) (Cost=0 Card=1)
    Statistics
    154 recursive calls
    0 db block gets
    32070 consistent gets
    1622 physical reads
    0 redo size
    305785 bytes sent via SQL*Net to client
    2807 bytes received via SQL*Net from client
    212 SQL*Net roundtrips to/from client
    10 sorts (memory)
    0 sorts (disk)
    3149 rows processed
    The query plan for the query WITHOUT Distinct and Order By is:
    Elapsed: 00:00:03.57
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=299 Card=47 Bytes=12220)
    1 0 NESTED LOOPS (Cost=299 Card=47 Bytes=12220)
    2 1 NESTED LOOPS (Cost=250 Card=49 Bytes=4165)
    3 2 NESTED LOOPS (Cost=103 Card=49 Bytes=2989)
    4 3 NESTED LOOPS (Cost=5 Card=49 Bytes=1960)
    5 4 TABLE ACCESS (BY INDEX ROWID) OF 'PALABRAS' (TABLE) (Cost=3 Card=1 Bytes=19)
    6 5 INDEX (RANGE SCAN) OF 'PALABRA' (INDEX (UNIQUE)) (Cost=2 Card=1)
    7 4 INDEX (RANGE SCAN) OF 'PK_OCURRENCIAS' (INDEX (UNIQUE)) (Cost=2 Card=140 Bytes=2940)
    8 3 TABLE ACCESS (BY INDEX ROWID) OF 'CENTRAL' (TABLE) (Cost=2 Card=1 Bytes=21)
    9 8 INDEX (UNIQUE SCAN) OF 'PK_CENTRAL' (INDEX (UNIQUE)) (Cost=1 Card=1)
    10 2 TABLE ACCESS (BY INDEX ROWID) OF 'CODTIT' (TABLE) (Cost=3 Card=1 Bytes=24)
    11 10 INDEX (RANGE SCAN) OF 'PK_CODTIT' (INDEX (UNIQUE)) (Cost=2 Card=1)
    12 1 TABLE ACCESS (BY INDEX ROWID) OF 'TITULOS' (TABLE) (Cost=1 Card=1 Bytes=175)
    13 12 INDEX (UNIQUE SCAN) OF 'PK_TITULOS' (INDEX (UNIQUE)) (Cost=0 Card=1)
    Statistics
    3376 recursive calls
    0 db block gets
    33443 consistent gets
    1061 physical reads
    0 redo size
    313751 bytes sent via SQL*Net to client
    2807 bytes received via SQL*Net from client
    422 SQL*Net roundtrips to/from client
    90 sorts (memory)
    0 sorts (disk)
    3149 rows processed
    I would appreciate a lot if somebody can tell me how to improve the performance of the query with Distinct and Order By.
    Thank you very much,
    Icaro Alzuru C.

    Hello,
    I am getting an slow answer when I add Distinct and Order By to the query:
    Without Distinct and Order By lasts 3.57 seconds; without Distinct and Order By lasts 28.15 seconds, which it's too much for our app.
    The query is:
    select distinct CC.acceso, CC.ext_acceso, TIT.TITULO_SALIDA
    from (((Ocurrencias CT01 inner join
    palabras p0 on (CT01.cod_palabra = p0.cod_palabra and p0.palabra like 'VENEZUELA%' AND p0.campo = 'AUTOR')) INNER JOIN
    CENTRAL CC ON (CT01.ACCESO = CC.ACCESO AND CT01.EXT_ACCESO = CC.EXT_ACCESO))) inner join
    codtit ctt on (CC.acceso = ctt.acceso and CC.ext_acceso = ctt.ext_acceso) inner join
    titulos tit on (ctt.cod_titulo = tit.cod_titulo and ctt.portada = '1')
    where CC.nivel_reg <> 's'
    ORDER BY 3 ASC;
    The query plan for the query WITH Distinct and Order By is:
    Elapsed: 00:00:28.15
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=301 Card=47 Bytes=12220)
    1 0 SORT (ORDER BY) (Cost=301 Card=47 Bytes=12220)
    2 1 SORT (UNIQUE) (Cost=300 Card=47 Bytes=12220)
    3 2 NESTED LOOPS (Cost=299 Card=47 Bytes=12220)
    4 3 NESTED LOOPS (Cost=250 Card=49 Bytes=4165)
    5 4 NESTED LOOPS (Cost=103 Card=49 Bytes=2989)
    6 5 NESTED LOOPS (Cost=5 Card=49 Bytes=1960)
    7 6 TABLE ACCESS (BY INDEX ROWID) OF 'PALABRAS' (TABLE) (Cost=3 Card=1 Bytes=19)
    8 7 INDEX (RANGE SCAN) OF 'PALABRA' (INDEX (UNIQUE)) (Cost=2 Card=1)
    9 6 INDEX (RANGE SCAN) OF 'PK_OCURRENCIAS' (INDEX (UNIQUE)) (Cost=2 Card=140 Bytes=2940)
    10 5 TABLE ACCESS (BY INDEX ROWID) OF 'CENTRAL' (TABLE) (Cost=2 Card=1 Bytes=21)
    11 10 INDEX (UNIQUE SCAN) OF 'PK_CENTRAL' (INDEX (UNIQUE)) (Cost=1 Card=1)
    12 4 TABLE ACCESS (BY INDEX ROWID) OF 'CODTIT' (TABLE) (Cost=3 Card=1 Bytes=24)
    13 12 INDEX (RANGE SCAN) OF 'PK_CODTIT' (INDEX (UNIQUE)) (Cost=2 Card=1)
    14 3 TABLE ACCESS (BY INDEX ROWID) OF 'TITULOS' (TABLE) (Cost=1 Card=1 Bytes=175)
    15 14 INDEX (UNIQUE SCAN) OF 'PK_TITULOS' (INDEX (UNIQUE)) (Cost=0 Card=1)
    Statistics
    154 recursive calls
    0 db block gets
    32070 consistent gets
    1622 physical reads
    0 redo size
    305785 bytes sent via SQL*Net to client
    2807 bytes received via SQL*Net from client
    212 SQL*Net roundtrips to/from client
    10 sorts (memory)
    0 sorts (disk)
    3149 rows processed
    The query plan for the query WITHOUT Distinct and Order By is:
    Elapsed: 00:00:03.57
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=299 Card=47 Bytes=12220)
    1 0 NESTED LOOPS (Cost=299 Card=47 Bytes=12220)
    2 1 NESTED LOOPS (Cost=250 Card=49 Bytes=4165)
    3 2 NESTED LOOPS (Cost=103 Card=49 Bytes=2989)
    4 3 NESTED LOOPS (Cost=5 Card=49 Bytes=1960)
    5 4 TABLE ACCESS (BY INDEX ROWID) OF 'PALABRAS' (TABLE) (Cost=3 Card=1 Bytes=19)
    6 5 INDEX (RANGE SCAN) OF 'PALABRA' (INDEX (UNIQUE)) (Cost=2 Card=1)
    7 4 INDEX (RANGE SCAN) OF 'PK_OCURRENCIAS' (INDEX (UNIQUE)) (Cost=2 Card=140 Bytes=2940)
    8 3 TABLE ACCESS (BY INDEX ROWID) OF 'CENTRAL' (TABLE) (Cost=2 Card=1 Bytes=21)
    9 8 INDEX (UNIQUE SCAN) OF 'PK_CENTRAL' (INDEX (UNIQUE)) (Cost=1 Card=1)
    10 2 TABLE ACCESS (BY INDEX ROWID) OF 'CODTIT' (TABLE) (Cost=3 Card=1 Bytes=24)
    11 10 INDEX (RANGE SCAN) OF 'PK_CODTIT' (INDEX (UNIQUE)) (Cost=2 Card=1)
    12 1 TABLE ACCESS (BY INDEX ROWID) OF 'TITULOS' (TABLE) (Cost=1 Card=1 Bytes=175)
    13 12 INDEX (UNIQUE SCAN) OF 'PK_TITULOS' (INDEX (UNIQUE)) (Cost=0 Card=1)
    Statistics
    3376 recursive calls
    0 db block gets
    33443 consistent gets
    1061 physical reads
    0 redo size
    313751 bytes sent via SQL*Net to client
    2807 bytes received via SQL*Net from client
    422 SQL*Net roundtrips to/from client
    90 sorts (memory)
    0 sorts (disk)
    3149 rows processed
    I would appreciate a lot if somebody can tell me how to improve the performance of the query with Distinct and Order By.
    Thank you very much,
    Icaro Alzuru C.

  • How to get sql server performance counters using query?

    Hai i want to see my sql server performance counters like, Full Scans/sec,  Buffer
    Cache Hit Ratio,  Database Transactions/sec, User
    Connections, Average Latch Wait Time (ms), Lock
    Waits/sec, Lock Timeouts/sec, Number
    of Deadlocks/sec, Total Server Memory, SQL
    Re-Compilations/sec, User Settable Query. If any one know how to get it by using query means, please help me.
    Thanks in advance

    Hello,
    Below is query created by Jonathan Kehayias for measuring Perfom counters using DMV sys.dm_os_performance_counter.
    You can download book from below link
    https://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/
    DECLARE @CounterPrefix NVARCHAR(30)
    SET @CounterPrefix = CASE WHEN @@SERVICENAME = 'MSSQLSERVER'
    THEN 'SQLServer:'
    ELSE 'MSSQL$' + @@SERVICENAME + ':'
    END ;
    -- Capture the first counter set
    SELECT CAST(1 AS INT) AS collection_instance ,
    [OBJECT_NAME] ,
    counter_name ,
    instance_name ,
    cntr_value ,
    cntr_type ,
    CURRENT_TIMESTAMP AS collection_time
    INTO #perf_counters_init
    FROM sys.dm_os_performance_counters
    WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Full Scans/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Index Searches/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Lazy Writes/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Page life expectancy'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'Processes Blocked'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'User Connections'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Waits/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Wait Time (ms)'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Re-Compilations/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
    AND counter_name = 'Memory Grants Pending'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'Batch Requests/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Compilations/sec'
    -- Wait on Second between data collection
    WAITFOR DELAY '00:00:01'
    -- Capture the second counter set
    SELECT CAST(2 AS INT) AS collection_instance ,
    OBJECT_NAME ,
    counter_name ,
    instance_name ,
    cntr_value ,
    cntr_type ,
    CURRENT_TIMESTAMP AS collection_time
    INTO #perf_counters_second
    FROM sys.dm_os_performance_counters
    WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Full Scans/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Index Searches/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Lazy Writes/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Page life expectancy'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'Processes Blocked'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'User Connections'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Waits/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Wait Time (ms)'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Re-Compilations/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
    AND counter_name = 'Memory Grants Pending'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'Batch Requests/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Compilations/sec'
    -- Calculate the cumulative counter values
    SELECT i.OBJECT_NAME ,
    i.counter_name ,
    i.instance_name ,
    CASE WHEN i.cntr_type = 272696576
    THEN s.cntr_value - i.cntr_value
    WHEN i.cntr_type = 65792 THEN s.cntr_value
    END AS cntr_value
    FROM #perf_counters_init AS i
    JOIN #perf_counters_second AS s
    ON i.collection_instance + 1 = s.collection_instance
    AND i.OBJECT_NAME = s.OBJECT_NAME
    AND i.counter_name = s.counter_name
    AND i.instance_name = s.instance_name
    ORDER BY OBJECT_NAME
    -- Cleanup tables
    DROP TABLE #perf_counters_init
    DROP TABLE #perf_counters_second
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Poor Performance of the query.

    Hi all,
    i am using this query
    select address1,address2,address3,city,place,pincode,siteid,bpcnum_0, contactname,fax,mobile,phone,website
    from (select address1,address2,address3,city,place,pincode,siteid,bpcnum_0, contactname,fax,mobile,phone,website,
                 row_number() over (partition by contactname, address1
                                   order by contactname, address1) as rn
            from vw_sub_cl_add1 where siteid=10 and bpcnum_0 = '0063') emp where rn =1I used explain plan for the query the result is
    Plan hash value: 3976107967
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | | | 0 (0)| | |
    | 1 | REMOTE | | | | | INFO | R->S |
    8 rows returned in 0.04 seconds      but, actually the query return 10 rows.
    the view "vw_sub_cl_add1" is created using database links(remote database server).
    this query i am using in for loop to retrieve the records and print it one by one.
    The problem is : The perfomance of the query is so poor. it takes 1.08 sec to display all the records.
    what are the steps i should do to minimize the retrival time.?
    Thanks in advance
    bye
    Srikavi

    Since this is query that is processed completely on the remote site, there are at least two potential issues that you should check if you don't want to use the "materialized view" approach:
    1. The time it takes to transport the result set to your local database, i.e. potential network issues
    2. The time it takes to process the query on the remote site
    Since you're only fetching 10 rows - if I understand you correctly - the first point shouldn't be an issue in your case.
    If you have suitable access to the remote site you would need to generate an execution plan of the "local" version of the query by logging directly into the remote size to find out why it takes longer than you expect. Probably it's missing some indexes if the number of rows to process should be only a few and you expect it to return more quickly.
    Here are simple instructions how to generate a meaningful execution plan if you want to post it here:
    Could you please post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your statement. Please use the \[code\] and \[code\] tags to enhance readability of the output provided:
    In SQL*Plus:
    SET LINESIZE 130
    EXPLAIN PLAN FOR <your statement>;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Note that the package DBMS_XPLAN.DISPLAY is only available from 9i on.
    In previous versions you could run the following in SQL*Plus (on the server) instead:
    @?/rdbms/admin/utlxplsA different approach in SQL*Plus:
    SET AUTOTRACE ON EXPLAIN
    <run your statement>;will also show the execution plan.
    In order to get a better understanding where your statement spends the time you might want to turn on SQL trace as described here:
    [When your query takes too long|http://forums.oracle.com/forums/thread.jspa?threadID=501834]
    and post the "tkprof" output here, too.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Poor performance when dragging item within a list loaded with images - Flex 4

    Hi,
    I have a custom built List component that is using a TileLayout. I am using a custom itemRenderer to load images into this list from our server (in this test, 44 images rae loaded). I have enabled dragEnabled and dragMove so that I can move items around within the list. The problem comes when I start dragging an item. The dragging operation is very slow and clunky.
    When I move the mouse to drag the item, the dropIndicator does not get refreshed for a few seconds and the movement feels like my PC is lagging pretty badly. I've also noticed that during this time my CPU usage is spiking up to around 25-40%. The funny part is I can scroll the list just fine without any lag at all, but the minute I drag the application starts to lag really bad. I do have some custom dragOver code that I used to override the dragOverHandler of the list control, but the problem persists even if I take that code out. I've tried with useVirtualLayout set to both true and false and neither setting made a difference. 
    Any ideas as to what could be causing the poor performance and/or how I can go abouts fixing it?
    Thanks a lot in advance!

    Ahh, good call about the Performance profiler. I'm pretty new to the profiling thing with Flex (haven't used Builder Pro before
    the Flex 4 beta) so please forgive me
    I found some interesting things running the performance profiler but I'm not sure I understand what to make of it all. I cleared the Performance Profile data when right before I loaded the images into the list. I then moved some images around and then captured the Profiling Data (If I understand Adobe correctly, this is the correct way to capture performance information for a set of actions).
    What I found is there is a [mouseEvent] item that took 3101ms with 1 "Calls" (!!!!). When I drill down into that item to see the Method Statistics, I actually see three different Callees and no callers. The sum of the time it took the Callees to execute does not even come close to adding up to the 3101 ms (about 40ms). I'm not sure what I can make of those numbers, or if they are even meaningful. Any insight into these?
    The only other items that stand out to me are [pre-render] which has 863ms (Cumulative Time) / 639ms (Self Time), [enterFrameEvent] which has 746ms / 6ms (?!), and [tincan] (what the heck is tincan?) which has times of 521ms for both Cumulative and Self.
    Can anyone offer some insight into these numbers and maybe make some more suggestions for me? I apologize for my ignorance on these numbers - as I said, I'm new to the whole Flex profiling thing.
    Many thanks in advance!
    Edit: I just did another check, this time profiling only from the start of my drag to the end of my drop, and I still see [mouseEvent] taking almost 1000ms of Cumulative Time. However, when I double click that item to see the Method Statistics, no Callers or Callees are listed. What's causing this [mouseEvent] and how come it's taking so long?

  • Slow performance when using cursor with bind variable

    i'm facing the problem mentioned in the subject.
    whenever i use the bind variable it would take more than 5mins to fetch 157 records, but if i hardcode the value ( not using variable ) it would take only 10sec to fetch 157 records.
    can anyone give me some guide to solve this problem? thank you..
    Code :
    DECLARE
    cursor cur1(l_startdate IN varchar2,l_enddate IN varchar2) IS
    select * from shipment ship where ship.insertion_date >= to_date(l_startdate,'DD-MM-YYYY HH24:MI:SS') and ship.insertion_date < to_date(l_enddate ,'DD-MM-YYYY HH24:MI:SS')
    TYPE shipment_aat IS TABLE OF cur1%ROWTYPE INDEX BY PLS_INTEGER;
    l_shpt shipment_aat;
    limit_in INTEGER := 100;
    BEGIN
    v_startdate := '10-06-2008 14:00:00';
    v_enddate := '10-06-2008 17:00:00';
    OPEN C_shpt(v_startdate,v_enddate);
    LOOP --start shipment loop   
    FETCH C_shpt BULK COLLECT INTO l_shpt LIMIT limit_in;
         FOR indx IN 1 .. l_shpt.COUNT
    LOOP
    DBMS_OUTPUT.PUT_LINE('l_shpt value ' || l_shpt(indx).ship_number || '/' || l_shpt(indx).insertion_date);
    END LOOP;
    EXIT WHEN l_shpt.COUNT < limit_in;
    END LOOP; -- end of shipment loop
    CLOSE cur1;
    END;

    When your query takes too long ...

  • Functionality loss when 'Using Query Bind Variables in Advanced Search

    Regarding: 'Using Query Bind Variables in Quick or Advanced Search'
    The functionality to do the following is lost when I use bind variables in the Advanced Search:
    "Result matches all conditions"
    "Result matches any condition"
    "Case Sensitive?"
    Is there a way to Search with Detail groups but to keep the above functionality?

    Hi,
    Your application module impl java class extends the JHeadstart class JhsApplicationModuleImpl. THe latter declares a method:
    public void advancedSearch(String viewObjectUsage,java.util.ArrayList arguments,Boolean allConditionsMet).
    In your application module impl java override the advancedSearch method where you can include your own custom code before invoking the super method:
    super.advancedSearch(viewObjectUsage,arguments,allConditionsMet);
    The 'arguments' parameter is an arraylist of QueryCondition objects. You can set several properties for QueryCondition objects such as case-sensitity, operators etc.
    Regards,
    Ibrahim

Maybe you are looking for