Ranking Performance

I need a Discoverer workbook/worksheet showing the top 15 airlines in terms of passenger count. More specifically, the top 15 are each listed in the report with their respective percentage share (highest to lowest) and any count less then 15 are totaled as the last line.
Am fairly new in Discoverer report development and any help will be highly appreciated. Thanks.

Hi Ned
This is possible but we have to use some rather clever calculations. Let me give you an example based on Airline and Count.
1. Create a table worksheet that has Airline and Count and sort the rows high to low based on Count
2. Create a ranking calculation that looks like this:
RANK() OVER(ORDER BY Count DESC)
3. Create a calculation called Grand Total that looks like this:
SUM(Count SUM) OVER(ORDER BY Count SUM DESC RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING )/15
4. Create a calculation called Remainder that looks like this:
Grand Total-Count SUM
5. Create a total on Count using SUM, give this total the label Totals
6. Create a total on Grand Total using Cell SUM, assign no label to this total
7. Create a total on Remainder using Cell SUM, also assign no label to this total
8. Format the data in both Grand Total and Remainder so that the background color is the same as the foreground color. This effectively hides the intermediate values leaving just a single row at the bottom containing the Total Count for the 15 airlines, a Total for all airlines, and a total for the difference between all airlines and the 15 selected in the ranking
It is too hard a task for me to explain what each step does but try it out and you will be amazed at what Discoverer can do.
For anybody else reading this with interest, an example like this will be included in the advanced calculations section of my upcoming Discoverer 10g Handbook which is due for publication at the end of the year. Advanced sales are being taken on Amazon right now.
I also offer end user and adminsitrator training where users are taught how to handle advanced calculations like this.
Best wishes
Michael Armstrong-Smith
Armstrong-Smith Consulting

Similar Messages

  • CONNECT BY query performance resources for 10.2

    I couldn't find any relevant resource, I am planning to use hierarchical sql option on a mass of data so any kind of advice, hint or resource to read especially related to indexing, partitining benefits to CONNECT BY query will be appreciated
    Thank you.

    The best place is to look in the documentation... (http://www.oracle.com/pls/db102/search?remark=quick_search&word=connect+by&tab_id=&format=ranked)
    Performance is not just black and white, but will depend on many factors, so without knowing your data or what you are trying to achieve and without you having tried to produce some queries and provide explain plans and traces, we're not going to be able to give any specific advice.

  • Performing ranking calculations with the BEx Query Designer - ideas?

    I have a scenario where I have a key figure with raw values.  In the column beside this I want to rank the key figures by their raw values.
    Something like this:
    Amount      Rank
       0.11           2
       0.05           3
       0.22           1
       0.03           4
    I can do this no problem using the "Calculate Single Values as:" Ranked List.
    For subsequent calculations I need to perform mathematical operations on the RANK column.    For example say I want to make a 3rd column where I divide the rank by 2:
    Amount      Rank     Rank by 2
       0.11           2             1
       0.05           3            1.5
       0.22           1            0.5
       0.03           4             2
    I cannot figure out how to do this as SAP does not really STORE the values of the rank column for my next calculation.  The "Rank by 2" column actually shows this:
    Rank by 2
        0.065
        0.0025
         0.11
        0.015
    which is dividing the original amount by 2 and not the actual RANK value.
    Anyone have some suggestions on what I can do?

    I know what you are talking about, it will always return 1 or zero which is true or false, I don't think you can do anything much to this. Since, the value of Ranked is getting calculated at runtime.
    thanks.
    Wond

  • Webservice implementation options and their performance ranking?

    If I am to to implement a webservice from/to SAP ERP,  I consider I have at least 3 options:
    1) Without PI - generating webservice from an RFC enabled wrapper function module (or bapi) inside SAP ERP
    2) With PI, exposing a WS using RFC adapter in PI that uses an RFC wrapper fm (or bapi) in ERP
    3) With PI, exposing a WS using ABAP proxy in ERP where the proxy uses non-RFC wrapper fm (or bapi).
    Using ABAP proxy is recommended (instead of RFC adapter) for syncronous interfaces between PI and SAP applications I have heard, but still wanted to take RFC adapter as option.
    Does anybody have experience about performance comparison in these options, if you have tested them all? Such a test must use same context e.g. using BAPI_CUSTOMER_GETDETAIL and you should have a client that can use them all (you probably have different wsdl for each and your client must calculate/trace response times. I know it is possible to monitor response times inside XI, but practically absolute response times can be calculated only in the client.
    To be honest, I am more interested in hearing performance difference between generating WS from ERP directly or from PI. Options 2) and 3) are just PI variations. But if you have tested options 2) and 3) as well please let me know.
    I was thinking of testing all scenarios myself, but if you have experience already, then you would save my time.
    br: Kimmo

    Hi Kimmo,
       Whatis the PI version you are using?
    I think you have other options too.
    4) Create a service interface and implement the enterprise service in the backend.
    http://www.sappi.sapag.co.in/flat-file-to-file-senario/creating-custom-enterprise-services-using-abap-and-xi/
    The option 1 that you mentioned and option 4 (That i have mentioned) will be of comparable performace.
    From a performance stand point, option 1(or 4) will be the fastest (at least in theory ) as we do not have any mediating system.
    But from a standards perspective, the option that i have suggested, is better (Read mre about SOA concepts to appreciate this more).
    General suggestion is that we should not be using PI for User- machine integration (which is your case).
    Best Regards,
    Ravikanth Talagana

  • B200 M3 memory stuck at 1333MHz in performance mode

    Hello,
    We have 2 B200 M3s in a new deployment running 2.0(3a). The B200s are configured with 64GB using 8GB DIMMs, using BANK 0 of each channel. We've deployed a BIOS policy specifying performance mode for LV DDR, and confirmed this setting took effect within the BIOS, yet the memory continues to run at 1333MHz. When looking at the server inventory, the DIMMs are reported as dual rank 8GB 1600MHz DIMMs. We've tried forcing the DIMMs to low-voltage mode and back to performance mode to no avail.
    In other UCS environments, we've deployed these same blades with the same memory configuration and BIOS policy and had no issues getting the RAM to run full speed. We're not using any kind of power capping either.
    Thoughts?

    Hi Brad,
    What CPU is being used?  3 of the supported CPU's for the B200-M3 do not support 1600 Mhz:
    http://www.cisco.com/en/US/docs/unified_computing/ucs/hw/chassis/install/B200M3.html#wp1028500
    Mike

  • Performance issue in Webi rep when using custom object from SAP BW univ

    Hi All,
    I had to design a report that runs for the previous day and hence we had created a custom object which ranks the dates and then a pre-defined filter which picks the date with highest rank.
    the definition for the rank variable(in universe) is as follows:
    <expression>Rank([0CALDAY].Currentmember,  Order([0CALDAY].Currentmember.Level.Members ,Rank([0CALDAY].Currentmember,[0CALDAY].Currentmember.Level.Members), BDESC))</expression>
    Now to the issue I am currently facing,
    The report works fine when we ran it on a test environment ie :with small amount of data.
    Our production environment has millions of rows of data and when I run the report with filter it just hangs.I think this is because it tries to rank all the dates(to find the max date) and thus resulting in a huge performance issue.
    Can someone suggest how this performance issue can be overcome?
    I work on BO XI3.1 with SAP BW.
    Thanks and Regards,
    Smitha.

    Hi,
    Using a variable on the BW side is not feasible since we want to use the same BW query for a few other reports as well.
    Could you please explain what you mean by 'use LAG function'.How can it be used in this scenario?
    Thanks and Regards,
    Smitha Mohan.

  • Performance issue with two unbanalnced hierarchies in a single report

    Hi All
    We are facing the performance issue with one of the report which houses two unbalanced hierarchies (having 18 levels) - skipped & ragged. Basically its a part of OBIAPPS financila analytics .
    The query is below :
    Could anyone let me know how to improve the performane. Any parameter that should be looked at while using unbalanced hierarchies.
    WITH SAWITH0
    AS ( SELECT SUM (T91707.OTHER_LOC_AMT) AS c1,
    MAX (T314768.HIER2_CODE) AS c2,
    MAX (T314768.HIER3_CODE) AS c3,
    MAX (T314768.HIER4_CODE) AS c4,
    MAX (T314768.HIER5_CODE) AS c5,
    MAX (T314768.HIER6_CODE) AS c6,
    MAX (T314768.HIER7_CODE) AS c7,
    MAX (T314768.HIER8_CODE) AS c8,
    MAX (T314768.HIER9_CODE) AS c9,
    MAX (T314768.HIER10_CODE) AS c10,
    MAX (T314768.HIER11_CODE) AS c11,
    MAX (T314768.HIER12_CODE) AS c12,
    MAX (T314768.HIER13_CODE) AS c13,
    MAX (T314768.HIER14_CODE) AS c14,
    MAX (T314768.HIER15_CODE) AS c15,
    MAX (T314768.HIER16_CODE) AS c16,
    MAX (T314768.HIER17_CODE) AS c17,
    MAX (T314768.HIER18_CODE) AS c18,
    MAX (T314768.HIER19_CODE) AS c19,
    MAX (T314768.HIER20_CODE) AS c20,
    T314768.HIER1_NAME AS c21,
    T314768.HIER1_CODE AS c22,
    T314914.HIER1_NAME AS c24,
    T314914.HIER10_NAME AS c25,
    T314914.HIER11_NAME AS c26,
    T314914.HIER12_NAME AS c27,
    T314914.HIER13_NAME AS c28,
    T314914.HIER14_NAME AS c29,
    T314914.HIER15_NAME AS c30,
    T314914.HIER16_NAME AS c31,
    T314914.HIER17_NAME AS c32,
    T314914.HIER18_NAME AS c33,
    T314914.HIER19_NAME AS c34,
    T314914.HIER2_NAME AS c35,
    T314914.HIER20_NAME AS c36,
    T314914.HIER3_NAME AS c37,
    T314914.HIER4_NAME AS c38,
    T314914.HIER5_NAME AS c39,
    T314914.HIER6_NAME AS c40,
    T314914.HIER7_NAME AS c41,
    T314914.HIER8_NAME AS c42,
    T314914.HIER9_NAME AS c43,
    T314914.HIER20_CODE AS c44,
    T314914.HIER1_CODE AS c45,
    T314914.HIER10_CODE AS c46,
    T314914.HIER11_CODE AS c47,
    T314914.HIER12_CODE AS c48,
    T314914.HIER13_CODE AS c49,
    T314914.HIER14_CODE AS c50,
    T314914.HIER15_CODE AS c51,
    T314914.HIER16_CODE AS c52,
    T314914.HIER17_CODE AS c53,
    T314914.HIER18_CODE AS c54,
    T314914.HIER19_CODE AS c55,
    T314914.HIER2_CODE AS c56,
    T314914.HIER3_CODE AS c57,
    T314914.HIER4_CODE AS c58,
    T314914.HIER5_CODE AS c59,
    T314914.HIER6_CODE AS c60,
    T314914.HIER7_CODE AS c61,
    T314914.HIER8_CODE AS c62,
    T314914.HIER9_CODE AS c63
    FROM W_HIERARCHY_D T314768 /* Dim_W_HIERARCHY_D_Segment11 */
    W_GL_SEGMENT_D T315677 /* Dim_W_GL_SEGMENT_D_Segment11 */
    W_HIERARCHY_D T314914 /* Dim_W_HIERARCHY_D_Segment13 */
    W_GL_SEGMENT_D T315731 /* Dim_W_GL_SEGMENT_D_Segment13 */
    W_GL_ACCOUNT_D T91397 /* Dim_W_GL_ACCOUNT_D */
    W_GL_OTHER_F T91707 /* Fact_W_GL_OTHER_F */
    WHERE ( T91397.ROW_WID = T91707.GL_ACCOUNT_WID
    AND T91397.ACCOUNT_SEG11_CODE = T315677.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG13_CODE = T315731.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG11_ATTRIB = T315677.SEGMENT_LOV_ID
    AND T91397.ACCOUNT_SEG13_ATTRIB = T315731.SEGMENT_LOV_ID
    AND T314768.HIER_CODE = T315677.SEGMENT_LOV_ID
    AND T314768.HIER_NAME = T315677.SEGMENT_LOV_NAME
    AND T314768.HIERARCHY_ID = T315677.SEGMENT_VAL_CODE
    AND T314914.HIER_CODE = T315731.SEGMENT_LOV_ID
    AND T314914.HIER_NAME = T315731.SEGMENT_LOV_NAME
    AND T314914.HIERARCHY_ID = T315731.SEGMENT_VAL_CODE
    AND T315677.SEGMENT_LOV_NAME =
    'Responsibility_Centre_Functional'
    AND T315677.SEGMENT_LOV_ID = 1000163
    AND T315731.SEGMENT_LOV_NAME = 'Account_Master'
    AND T315731.SEGMENT_LOV_ID = 1000165
    AND ( T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER11_CODE IS NULL)
    AND (T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER12_CODE IS NULL)
    AND ( T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER8_CODE IS NULL)
    AND ( T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER9_CODE IS NULL)
    AND ( T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER10_CODE IS NULL)
    AND ( T314914.HIER1_CODE IN ('ALL_LI')
    OR T314914.HIER2_CODE IN ('S000000001')
    OR T314914.HIER3_CODE IN ('S000005150')
    OR T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022'))
    AND ( T314914.HIER2_CODE IN ('S000000001')
    OR T314914.HIER3_CODE IN ('S000005150')
    OR T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER2_CODE IS NULL)
    AND ( T314914.HIER3_CODE IN ('S000005150')
    OR T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER3_CODE IS NULL)
    AND ( T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER4_CODE IS NULL)
    AND ( T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER5_CODE IS NULL)
    AND ( T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER6_CODE IS NULL)
    AND ( T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER7_CODE IS NULL)
    AND T314768.HIER1_CODE IS NOT NULL
    AND T314914.HIER20_CODE IS NOT NULL
    AND T314914.HIER13_CODE IS NULL
    AND T314914.HIER14_CODE IS NULL
    AND T314914.HIER15_CODE IS NULL
    AND T314914.HIER16_CODE IS NULL
    AND T314914.HIER17_CODE IS NULL
    AND T314914.HIER18_CODE IS NULL
    AND T314914.HIER19_CODE IS NULL)
    GROUP BY T314768.HIER1_CODE,
    T314768.HIER1_NAME,
    T314914.HIER1_CODE,
    T314914.HIER1_NAME,
    T314914.HIER2_CODE,
    T314914.HIER2_NAME,
    T314914.HIER3_CODE,
    T314914.HIER3_NAME,
    T314914.HIER4_CODE,
    T314914.HIER4_NAME,
    T314914.HIER5_CODE,
    T314914.HIER5_NAME,
    T314914.HIER6_CODE,
    T314914.HIER6_NAME,
    T314914.HIER7_CODE,
    T314914.HIER7_NAME,
    T314914.HIER8_CODE,
    T314914.HIER8_NAME,
    T314914.HIER9_CODE,
    T314914.HIER9_NAME,
    T314914.HIER10_CODE,
    T314914.HIER10_NAME,
    T314914.HIER11_CODE,
    T314914.HIER11_NAME,
    T314914.HIER12_CODE,
    T314914.HIER12_NAME,
    T314914.HIER13_CODE,
    T314914.HIER13_NAME,
    T314914.HIER14_CODE,
    T314914.HIER14_NAME,
    T314914.HIER15_CODE,
    T314914.HIER15_NAME,
    T314914.HIER16_CODE,
    T314914.HIER16_NAME,
    T314914.HIER17_CODE,
    T314914.HIER17_NAME,
    T314914.HIER18_CODE,
    T314914.HIER18_NAME,
    T314914.HIER19_CODE,
    T314914.HIER19_NAME,
    T314914.HIER20_CODE,
    T314914.HIER20_NAME),
    SAWITH1
    AS (SELECT SUM (D1.c1) OVER () AS c1,
    MAX (D1.c2) OVER (PARTITION BY D1.c22) AS c2,
    MAX (D1.c3) OVER (PARTITION BY D1.c22) AS c3,
    MAX (D1.c4) OVER (PARTITION BY D1.c22) AS c4,
    MAX (D1.c5) OVER (PARTITION BY D1.c22) AS c5,
    MAX (D1.c6) OVER (PARTITION BY D1.c22) AS c6,
    MAX (D1.c7) OVER (PARTITION BY D1.c22) AS c7,
    MAX (D1.c8) OVER (PARTITION BY D1.c22) AS c8,
    MAX (D1.c9) OVER (PARTITION BY D1.c22) AS c9,
    MAX (D1.c10) OVER (PARTITION BY D1.c22) AS c10,
    MAX (D1.c11) OVER (PARTITION BY D1.c22) AS c11,
    MAX (D1.c12) OVER (PARTITION BY D1.c22) AS c12,
    MAX (D1.c13) OVER (PARTITION BY D1.c22) AS c13,
    MAX (D1.c14) OVER (PARTITION BY D1.c22) AS c14,
    MAX (D1.c15) OVER (PARTITION BY D1.c22) AS c15,
    MAX (D1.c16) OVER (PARTITION BY D1.c22) AS c16,
    MAX (D1.c17) OVER (PARTITION BY D1.c22) AS c17,
    MAX (D1.c18) OVER (PARTITION BY D1.c22) AS c18,
    MAX (D1.c19) OVER (PARTITION BY D1.c22) AS c19,
    MAX (D1.c20) OVER (PARTITION BY D1.c22) AS c20,
    D1.c21 AS c21,
    D1.c22 AS c22,
    SUM (
    D1.c1)
    OVER (
    PARTITION BY D1.c46,
    D1.c47,
    D1.c48,
    D1.c49,
    D1.c50,
    D1.c51,
    D1.c52,
    D1.c53,
    D1.c54,
    D1.c55,
    D1.c45,
    D1.c44,
    D1.c56,
    D1.c57,
    D1.c58,
    D1.c59,
    D1.c60,
    D1.c61,
    D1.c62,
    D1.c63,
    D1.c22)
    AS c23,
    D1.c24 AS c24,
    D1.c25 AS c25,
    D1.c26 AS c26,
    D1.c27 AS c27,
    D1.c28 AS c28,
    D1.c29 AS c29,
    D1.c30 AS c30,
    D1.c31 AS c31,
    D1.c32 AS c32,
    D1.c33 AS c33,
    D1.c34 AS c34,
    D1.c35 AS c35,
    D1.c36 AS c36,
    D1.c37 AS c37,
    D1.c38 AS c38,
    D1.c39 AS c39,
    D1.c40 AS c40,
    D1.c41 AS c41,
    D1.c42 AS c42,
    D1.c43 AS c43,
    D1.c44 AS c44,
    D1.c45 AS c45,
    D1.c46 AS c46,
    D1.c47 AS c47,
    D1.c48 AS c48,
    D1.c49 AS c49,
    D1.c50 AS c50,
    D1.c51 AS c51,
    D1.c52 AS c52,
    D1.c53 AS c53,
    D1.c54 AS c54,
    D1.c55 AS c55,
    D1.c56 AS c56,
    D1.c57 AS c57,
    D1.c58 AS c58,
    D1.c59 AS c59,
    D1.c60 AS c60,
    D1.c61 AS c61,
    D1.c62 AS c62,
    D1.c63 AS c63
    FROM SAWITH0 D1)
    SELECT DISTINCT
    38 AS c1,
    D1.c24 AS c2,
    D1.c25 AS c3,
    D1.c26 AS c4,
    D1.c27 AS c5,
    D1.c28 AS c6,
    D1.c29 AS c7,
    D1.c30 AS c8,
    D1.c31 AS c9,
    D1.c32 AS c10,
    D1.c33 AS c11,
    D1.c34 AS c12,
    D1.c35 AS c13,
    D1.c36 AS c14,
    D1.c37 AS c15,
    D1.c38 AS c16,
    D1.c39 AS c17,
    D1.c40 AS c18,
    D1.c41 AS c19,
    D1.c42 AS c20,
    D1.c43 AS c21,
    D1.c21 AS c22,
    NULL AS c23,
    NULL AS c24,
    NULL AS c25,
    NULL AS c26,
    NULL AS c27,
    NULL AS c28,
    NULL AS c29,
    NULL AS c30,
    NULL AS c31,
    NULL AS c32,
    NULL AS c33,
    NULL AS c34,
    NULL AS c35,
    NULL AS c36,
    NULL AS c37,
    NULL AS c38,
    NULL AS c39,
    NULL AS c40,
    NULL AS c41,
    D1.c44 AS c42,
    D1.c45 AS c43,
    D1.c46 AS c44,
    D1.c47 AS c45,
    D1.c48 AS c46,
    D1.c49 AS c47,
    D1.c50 AS c48,
    D1.c51 AS c49,
    D1.c52 AS c50,
    D1.c53 AS c51,
    D1.c54 AS c52,
    D1.c55 AS c53,
    D1.c56 AS c54,
    D1.c57 AS c55,
    D1.c58 AS c56,
    D1.c59 AS c57,
    D1.c60 AS c58,
    D1.c61 AS c59,
    D1.c62 AS c60,
    D1.c63 AS c61,
    NULL AS c62,
    D1.c22 AS c63,
    NULL AS c64,
    NULL AS c65,
    NULL AS c66,
    NULL AS c67,
    NULL AS c68,
    NULL AS c69,
    NULL AS c70,
    NULL AS c71,
    NULL AS c72,
    NULL AS c73,
    NULL AS c74,
    NULL AS c75,
    NULL AS c76,
    NULL AS c77,
    NULL AS c78,
    NULL AS c79,
    NULL AS c80,
    NULL AS c81,
    D1.c23 AS c82,
    CASE WHEN 1 = 1 THEN 1 ELSE 0 END AS c83,
    CASE
    WHEN D1.c2 IS NULL
    AND D1.c3 IS NULL
    AND D1.c4 IS NULL
    AND D1.c5 IS NULL
    AND D1.c6 IS NULL
    AND D1.c7 IS NULL
    AND D1.c8 IS NULL
    AND D1.c9 IS NULL
    AND D1.c10 IS NULL
    AND D1.c11 IS NULL
    AND D1.c12 IS NULL
    AND D1.c13 IS NULL
    AND D1.c14 IS NULL
    AND D1.c15 IS NULL
    AND D1.c16 IS NULL
    AND D1.c17 IS NULL
    AND D1.c18 IS NULL
    AND D1.c19 IS NULL
    AND D1.c20 IS NULL
    THEN
    1
    ELSE
    0
    END
    AS c84
    FROM SAWITH1 D1
    WHERE ( D1.c44 IS NOT NULL
    AND D1.c50 IS NULL
    AND D1.c49 IS NULL
    AND D1.c22 IS NOT NULL
    AND D1.c51 IS NULL
    AND D1.c52 IS NULL
    AND D1.c53 IS NULL
    AND D1.c54 IS NULL
    AND D1.c55 IS NULL)
    /* Formatted on 12/17/2012 7:49:44 PM (QP5 v5.139.911.3011) */
    WITH OBICOMMON0
    AS (SELECT T156337.ROW_WID AS c2,
    T156337.MCAL_PERIOD_WID AS c3,
    ROW_NUMBER ()
    OVER (PARTITION BY T156337.MCAL_PERIOD_WID
    ORDER BY T156337.MCAL_PERIOD_WID DESC)
    AS c4,
    T156337.MCAL_PERIOD_NAME AS c5,
    T156337.MCAL_PER_NAME_YEAR AS c6
    FROM W_MCAL_DAY_D T156337 /* Dim_W_MCAL_DAY_D_Fiscal_Day */
    WHERE (T156337.MCAL_CAL_NAME = 'Accounting')),
    SAWITH0
    AS (SELECT CASE
    WHEN CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END
    IS NOT NULL
    THEN
    RANK ()
    OVER (
    ORDER BY
    CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END ASC NULLS LAST)
    END
    AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3
    FROM OBICOMMON0 D1),
    SAWITH1
    AS (SELECT DISTINCT
    MIN (D1.c1) OVER (PARTITION BY D1.c3) AS c1, D1.c2 AS c2
    FROM SAWITH0 D1),
    SAWITH2
    AS (SELECT CASE
    WHEN CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END
    IS NOT NULL
    THEN
    RANK ()
    OVER (
    ORDER BY
    CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END ASC NULLS LAST)
    END
    AS c1,
    D1.c3 AS c2,
    D1.c5 AS c3,
    D1.c6 AS c4
    FROM OBICOMMON0 D1),
    SAWITH3 AS (SELECT DISTINCT MIN (D1.c1) OVER (PARTITION BY D1.c2) AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3,
    D1.c4 AS c4
    FROM SAWITH2 D1),
    SAWITH4
    AS ( SELECT SUM (T91707.TD_OTHER_REP_AMT) AS c1,
    T314914.HIER1_NAME AS c2,
    D2.c3 AS c3,
    T314914.HIER1_CODE AS c4,
    D2.c2 AS c5
    FROM W_HIERARCHY_D T314914 /* Dim_W_HIERARCHY_D_Segment13 */
    W_GL_SEGMENT_D T315731 /* Dim_W_GL_SEGMENT_D_Segment13 */
    W_GL_ACCOUNT_D T91397 /* Dim_W_GL_ACCOUNT_D */
    W_GL_OTHER_F T91707 /* Fact_W_GL_OTHER_F */
    SAWITH1 D4,
    SAWITH3 D2
    WHERE ( T314914.HIER_CODE = T315731.SEGMENT_LOV_ID
    AND T314914.HIER_NAME = T315731.SEGMENT_LOV_NAME
    AND T91397.ROW_WID = T91707.GL_ACCOUNT_WID
    AND T91707.ACCT_PERIOD_END_DT_WID = D4.c2
    AND T314914.HIERARCHY_ID = T315731.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG13_CODE = T315731.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG13_ATTRIB = T315731.SEGMENT_LOV_ID
    AND T315731.SEGMENT_LOV_NAME =
    'Account_Retail_Distribution'
    AND T315731.SEGMENT_LOV_ID = 1000165
    AND D2.c1 = D4.c1
    AND (D2.c4 IN ('2011', '2012')))
    GROUP BY T314914.HIER1_CODE,
    T314914.HIER1_NAME,
    D2.c2,
    D2.c3)
    SELECT D1.c1 AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3,
    D1.c4 AS c4,
    D1.c5 AS c5,
    D1.c6 AS c6
    FROM ( SELECT DISTINCT 0 AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3,
    D1.c4 AS c4,
    D1.c1 AS c5,
    D1.c5 AS c6
    FROM SAWITH4 D1
    ORDER BY c2 NULLS FIRST, c4 NULLS FIRST, c3) D1
    WHERE ROWNUM <= 65001

    Hello Gurus, Experts
    Any help/tips here ...

  • The (nearly) Ultimate Intel HD Graphics 3000 gaming performance sheet

    Hi everyone,
    I am compiling my personally tested list of about 200 Mac & PC games that can be played on the new (lame    ) Intel HD 3000 chip coming
    with the new 2011 Macbooks 13" (and presumably in the new Mini and Air, too).
    I hope this provides some additional useful infos for people that consider buying a 13" MBP+  and are not sure about the games working with this chip
    or about the the performance at all.
    Testing System is a MBP i5 2.3GHz with separate Native 10.6.7 , Win7x 64 Pro SP1, and Crossover and Paralles on OS X tests.
    10.7 Lion test will also be incorporated, once available.
    of course ther is this the Notebookcheck Site Test here: http://www.notebookcheck.net/Intel-H...0.37948.0.html
    But if you are looking for more specific games, my chart might help further.
    I am currently working and optimzing on this, while I have the time, so it will take time until it´s complete:
    https://spreadsheets.google.com/ccc?...de&pli=1#gid=1
    peace,
    if some one feel inclined t contribute to this list feel free to contact me.

    Very informative.
    Could you include a ranking for games on the lowest settings that get more than 50 fps?
    As you know 30 fps is fluid motion, but during gameplay it's not always consistant, it fluxuates up and down depending upon what's going on.
    In your ranking for "Playable" the 30fps bar is set a bit too low and stuttering and frame loss occurs if it drops down below that which it will.
    So it's kind of hard to determine by just "greater than 30 fps" if the game is worthy of purchase, a "greater than 50 fps" would be more accurate assessment.
    This of course may reduce the amount of "Playable" games on the Intel HD 3000, but it's more fair.
    Thanks
    Also if you could run Cinebench on the 13" MBP and state those scores it woud be very nice. Then one can compare it to te list below.
    Here's a list of the fastest GPU's ranked on their OpenGL tests. If one does a search for "6750M" they will see what the 2.2 Ghz 15" MacBook Pro (and higher) with the 1GB Radeon 6750M video card scores. Very impressive for a laptop.
    http://www.cbscores.com/index.php?sort=ogl&order=desc
    Edit: Oh, someone did submit sorry.
    The HD 3000 on the 2011 MBP gets a maximum 11.32 and the 6750 gets 36.27,  about 3 1/4 times faster.
    Pays to get the 2.2 Ghz 15" MBP or better if your into 3D games.

  • Sql query slowness due to rank and columns with null values:

        
    Sql query slowness due to rank and columns with null values:
    I have the following table in database with around 10 millions records:
    Declaration:
    create table PropertyOwners (
    [Key] int not null primary key,
    PropertyKey int not null,    
    BoughtDate DateTime,    
    OwnerKey int null,    
    GroupKey int null   
    go
    [Key] is primary key and combination of PropertyKey, BoughtDate, OwnerKey and GroupKey is unique.
    With the following index:
    CREATE NONCLUSTERED INDEX [IX_PropertyOwners] ON [dbo].[PropertyOwners]    
    [PropertyKey] ASC,   
    [BoughtDate] DESC,   
    [OwnerKey] DESC,   
    [GroupKey] DESC   
    go
    Description of the case:
    For single BoughtDate one property can belong to multiple owners or single group, for single record there can either be OwnerKey or GroupKey but not both so one of them will be null for each record. I am trying to retrieve the data from the table using
    following query for the OwnerKey. If there are same property rows for owners and group at the same time than the rows having OwnerKey with be preferred, that is why I am using "OwnerKey desc" in Rank function.
    declare @ownerKey int = 40000   
    select PropertyKey, BoughtDate, OwnerKey, GroupKey   
    from (    
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,       
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]   
    from PropertyOwners   
    ) as result   
    where result.[Rank]=1 and result.[OwnerKey]=@ownerKey
    It is taking 2-3 seconds to get the records which is too slow, similar time it is taking as I try to get the records using the GroupKey. But when I tried to get the records for the PropertyKey with the same query, it is executing in 10 milliseconds.
    May be the slowness is due to as OwnerKey/GroupKey in the table  can be null and sql server in unable to index it. I have also tried to use the Indexed view to pre ranked them but I can't use it in my query as Rank function is not supported in indexed
    view.
    Please note this table is updated once a day and using Sql Server 2008 R2. Any help will be greatly appreciated.

    create table #result (PropertyKey int not null, BoughtDate datetime, OwnerKey int null, GroupKey int null, [Rank] int not null)Create index idx ON #result(OwnerKey ,rnk)
    insert into #result(PropertyKey, BoughtDate, OwnerKey, GroupKey, [Rank])
    select PropertyKey, BoughtDate, OwnerKey, GroupKey,
    RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
    from PropertyOwners
    go
    declare @ownerKey int = 1
    select PropertyKey, BoughtDate, OwnerKey, GroupKey
    from #result as result
    where result.[Rank]=1
    and result.[OwnerKey]=@ownerKey
    go
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • RAM once and for all (singl-/dual-rank)

    Seriously, everyone says different things (seemingly)
    What's best to do...replace my existing 8GB RAM with as many dual-rank 4GB modules as possible/affordable, or keep the existing and buy (the more expensive) single-rank 4GB chips?
    dual rank chips are about half the price of single.
    is there some reason not to just go the cheaper option?

    Ratbaggy wrote:
    yeah cool, and thanks. interesting though...why would Apple use RAM that performs worse.
    While technically faster, just like populating three identical DIMMs to enable triple channel didn't show any measurable performance difference, I would imagine if you really benchmarked single vs. double ranked DIMMs you would be hard pressed to find a measurable difference.
    It comes to cost. Smaller capacity DIMMs are easier to manufacture in single ranked/fewer chip per module configurations. Higher density chips are more expensive, so that's why you see 4 and 8 GB DIMMs mainly as dual ranked DIMMs
    It's not an evil conspiracy but simple economics. It's just too bad Apple isn't more up front about the whole rank issue, it would solve a lot of confusion. The only reason I even knew about it is I just had to read up on it for some server purchases.

  • Performing Top-n Analysis (but per group)

    The Oracle University Guide SQL Volume 2 says:
    To perform Top-n Analysis the general syntax is
    SELECT [column_list], ROWNUM
    FROM (SELECT [column_list]
    FROM table
    ORDER BY Top-N_column)
    WHERE ROWNUM <= N;
    for example
    To display the top three earner names and salaries
    from the EMPLOYEES table.
    SELECT ROWNUM as RANK, last_name, salary
    FROM (SELECT last_name,salary FROM employees
    ORDER BY salary DESC)
    WHERE ROWNUM <= 3;
    or to display the four most senior employees in the company.
    SELECT ROWNUM as SENIOR,E.last_name, E.hire_date
    FROM (SELECT last_name,hire_date FROM employees
    ORDER BY hire_date)E
    WHERE rownum <= 4;
    but what about if I have groups? for example if I want to display the 3 top earners per department?
    In my case now
    I want to fetch the top 4 items per category, with the biggest quantity (posothta)
    SELECT ROWNUM as RANK,
    H.KATHG_EIDOYS,
    H.KATHG_EIDOYS_DESCR,
    H.EIDOS,
    H.EIDOS_DESCR,
    H.CODE_SUP_BASIKOS_NAME,
    H.RAFI_CODE,
    H.LINES,
    H.POSOTHTA
    from (
    SELECT B.KATHG_EIDOYS,
    D.DESCRIPTION KATHG_EIDOYS_DESCR,
    B.CODE EIDOS,
    B.DESCRIPTION EIDOS_DESCR,
    S.NAME CODE_SUP_BASIKOS_NAME,
    C.RAFI_CODE,
    COUNT(A.FLD_SEQ_NUM) LINES,
    nvl(SUM(decode(k.INV_APOGRAFH_FLAG,'0', decode(k.INV_EXAGOGH_POSOTHTA,1, a.POSOTHTA_TIMOLOGHSHS,2,-a.POSOTHTA_TIMOLOGHSHS))),0) POSOTHTA
    FROM ERP_EIDOI_ANA_RAFI C,
    ERP_KODIKOI_KINHSHS K,
    ERP_POLHSEIS_DETAILS A,
    ERP_SUP_CUST S,
    ERP_KATHG_EIDON D,
    ERP_EIDH b
    WHERE B.COMPANY = DECODE(1,1,'9',B.COMPANY)
    AND a.COMPANY_KK=K.COMPANY
    AND a.KK_CODE=K.CODE
    and A.company_WAREHOUSE = c.COMPANY_WARE(+)
    and A.MASTER_WAREHOUSE = c.MASTER_WARE_CODE(+)
    and A.CODE_WAREHOUSE = c.DETAIL_WARE_CODE(+)
    and A.COMPANY_EIDOS = c.COMPANY_EIDOS(+)
    and A.EIDOS = c.CODE_EIDOS (+)
    AND C.DEFAULT_FLAG (+)= 1
    AND b.code = a.EIDOS
    and b.company = a.COMPANY_EIDOS
    AND D.CODE= B.KATHG_EIDOYS
    AND D.COMPANY= B.COMPANY_KATHG_EIDOYS
    AND B.COMPANY_SUP_BASIKOS = S.COMPANY
    AND B.CODE_SUP_BASIKOS = S.CODE
    AND B.PROMHTHEYTHS_FLAG_BASIKOS = S.PELATHS_PROMHTHEYTHS_FLAG
    AND /*&p_where*/
    a.COMPANY='9' and (a.group_source) = '10' and (A.MASTER_WAREHOUSE) = '01' and (A.CODE_WAREHOUSE) = '0101' and (a.hmerom_parast) >= to_date('01/01/2006','dd/mm/rrrr') and (a.hmerom_parast) <= to_date('25/05/2006','dd/mm/rrrr')
    GROUP BY B.KATHG_EIDOYS, D.DESCRIPTION, B.CODE, B.DESCRIPTION, S.NAME,C.RAFI_CODE
    ORDER BY 8 DESC
    ) H
    where 1=1 and ROWNUM <= 4
    this select does not bring me the desired results, because if for example
    category 01 has 10 items
    and category 02 has 2 items,
    this select will bring me only the first four rows
    and not the items from the 02 category.
    If you understand what is the case I will wait for your replies.
    Thanks in advance

    Hi,
    Here is an example. It gives you customers ids with highest salary per department.
    SELECT CUSTOMER_ID, SALARY, RANK, DEPARTMENT
    FROM (SELECT CUSTOMER_ID, SALARY, DEPARTMENT,
    RANK() OVER (PARTITION BY DEPARTMENT ORDER BY SALARY DESC) AS RANK
    FROM TABLEA)
    WHERE RANK < 2;
    Peter D.

  • Is rank() really better than rownum for top-n-queries?

    Several sources say that for Oracle databases rank() should be used instead of 'rownum <= n' for top-n-queries. But here we have an application, where we a lot of top-n queries are executed on a big table with several million rows and rank() has a quite bad performance. I get much better results when I use a query with rownum <= n but the programmer of the application doesn't want to change it in the software because of those articles about rank() and rownum. I wonder, whether it is possible, to find a better form of the rank()-query or an additional index, that gives me the same performance.
    To explain my case I created the following example (if you try it, be aware that depending on the size of your dba_objects view you might need up to half a gig free space in your tablespace for this example).
    create table big_objects
    as
    select
    ascii(m.alpha)*100000+o.object_id object_id,
    o.owner owner,
    o.object_type,
    m.alpha||'_'||o.object_name object_name,
    sysdate-400+mod(100*object_id+99*ascii(m.alpha),365)+24/(o.object_id+ascii(m.alpha)) created,
    o.status
    from
    (select distinct
    upper(substr(object_name,1,1)) alpha
    from
    sys.dba_objects
    where
    upper(substr(object_name,1,1)) between 'A' and 'Z') m,
    sys.dba_objects o
    order by
    object_name;
    create index bigindex_1 on big_objects (owner, object_type, created);
    analyze table big_objects compute statistics;
    So my table looks a bit like dba_objects but with much more rows and I made a synthetic "created" date which is more similar to my real case, where top-n means a date selection of the newest records from a certain type.
    Here is the size of the segments on an nearly empty 11gR2 database:
    select segment_name, bytes, blocks from sys.dba_segments where segment_name like 'BIG%'
    SEGMENT_NAME BYTES BLOCKS
    BIGINDEX_1 75497472 9216
    BIG_OBJECTS 142606336 17408
    On my database the example table has approx. 1,9 Mio rows:
    select count(*) from big_objects;
    COUNT(*)
    1884246
    and some 1,4% of those rows have owner = 'SYS' and object_type = 'INDEX'
    select
    count(*)
    from big_objects
    where owner = 'SYS'
    and object_type = 'INDEX';
    COUNT(*)
    25896
    But I want to find only the 10 newest indexes for the owner SYS. I think the typical rank() approach would be:
    select
    owner,
    object_type,
    object_name,
    object_id,
    status,
    created
    from
    ( select
    owner,
    object_type,
    object_name,
    object_id,
    status,
    created,
    rank() over (order by created desc) rnk
    from
    big_objects
    where
    owner = 'SYS'
    and object_type = 'INDEX')
    where rnk <= 10
    order by created asc;
    OWNER OBJECT_TYPE OBJECT_NAME OBJECT_ID STATUS CREATED
    SYS INDEX B_COLLELEMIND 6600515 VALID 15.04.2010 19:05:55
    SYS INDEX V_I_WRI$_OPTSTAT_IND_OBJ#_ST 8600466 VALID 15.04.2010 19:09:03
    SYS INDEX G_I_RLS 7100375 VALID 15.04.2010 19:23:55
    SYS INDEX V_I_DIR$SERVICE_UI 8600320 VALID 15.04.2010 19:31:33
    SYS INDEX L_I_TSM_DST2$ 7600308 VALID 15.04.2010 19:36:26
    SYS INDEX L_I_IDL_UB11 7600235 VALID 15.04.2010 19:57:34
    SYS INDEX V_I_VIEWTRCOL1 8600174 VALID 15.04.2010 20:19:21
    SYS INDEX L_I_TRIGGER2 7600162 VALID 15.04.2010 20:31:39
    SYS INDEX L_I_NTAB1 7600089 VALID 15.04.2010 21:35:53
    SYS INDEX B_I_SYN1 6600077 VALID 15.04.2010 22:08:07
    10 rows selected.
    Elapsed: 00:00:00.22
    Execution Plan
    Plan hash value: 2911012437
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1427 | 188K| 1400 (1)| 00:00:17 |
    | 1 | SORT ORDER BY | | 1427 | 188K| 1400 (1)| 00:00:17 |
    |* 2 | VIEW | | 1427 | 188K| 1399 (1)| 00:00:17 |
    |* 3 | WINDOW SORT PUSHED RANK | | 1427 | 79912 | 1399 (1)| 00:00:17 |
    | 4 | TABLE ACCESS BY INDEX ROWID| BIG_OBJECTS | 1427 | 79912 | 1398 (0)| 00:00:17 |
    |* 5 | INDEX RANGE SCAN | BIGINDEX_1 | 1427 | | 9 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("RNK"<=10)
    3 - filter(RANK() OVER ( ORDER BY INTERNAL_FUNCTION("CREATED") DESC )<=10)
    5 - access("OWNER"='SYS' AND "OBJECT_TYPE"='INDEX')
    Statistics
    1 recursive calls
    0 db block gets
    25870 consistent gets
    0 physical reads
    0 redo size
    1281 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    2 sorts (memory)
    0 sorts (disk)
    10 rows processed
    As from the index only the first two columns are used, all the 25896 records that I found above are read and sorted just to find the ten newest ones. Many unnecessary blocks are read and luckily all needed database blocks were in memory already. In our real case quite often a lot of physical reads are performed, which makes the performance of the application even worse.
    In my following example with a "rownum <= 10" all three columns of the index are used and the number of block gets is much, much smaller than in the rank() example.
    select
    owner,
    object_type,
    object_name,
    object_id,
    status,
    created
    from
    big_objects
    where
    (owner, object_type, created)
    in
    ( select
    owner,
    object_type,
    created
    from
    ( select /*+ first_rows(10) */
    owner,
    object_type,
    created
    from
    big_objects
    where
    owner = 'SYS'
    and object_type = 'INDEX'
    order by
    owner,
    object_type,
    created desc
    where rownum <= 10
    order by created asc;
    OWNER OBJECT_TYPE OBJECT_NAME OBJECT_ID STATUS CREATED
    SYS INDEX B_COLLELEMIND 6600515 VALID 15.04.2010 19:05:55
    SYS INDEX V_I_WRI$_OPTSTAT_IND_OBJ#_ST 8600466 VALID 15.04.2010 19:09:03
    SYS INDEX G_I_RLS 7100375 VALID 15.04.2010 19:23:55
    SYS INDEX V_I_DIR$SERVICE_UI 8600320 VALID 15.04.2010 19:31:33
    SYS INDEX L_I_TSM_DST2$ 7600308 VALID 15.04.2010 19:36:26
    SYS INDEX L_I_IDL_UB11 7600235 VALID 15.04.2010 19:57:34
    SYS INDEX V_I_VIEWTRCOL1 8600174 VALID 15.04.2010 20:19:21
    SYS INDEX L_I_TRIGGER2 7600162 VALID 15.04.2010 20:31:39
    SYS INDEX L_I_NTAB1 7600089 VALID 15.04.2010 21:35:53
    SYS INDEX B_I_SYN1 6600077 VALID 15.04.2010 22:08:07
    10 rows selected.
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 3360237620
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 10 | 760 | 17 (0)| 00:00:01 |
    | 1 | SORT ORDER BY | | 10 | 760 | 17 (0)| 00:00:01 |
    | 2 | NESTED LOOPS | | | | | |
    | 3 | NESTED LOOPS | | 10 | 760 | 17 (0)| 00:00:01 |
    | 4 | VIEW | VW_NSO_1 | 10 | 200 | 2 (50)| 00:00:01 |
    | 5 | HASH UNIQUE | | 10 | 200 | 4 (25)| 00:00:01 |
    |* 6 | COUNT STOPKEY | | | | | |
    | 7 | VIEW | | 11 | 220 | 3 (0)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN DESCENDING| BIGINDEX_1 | 1427 | 28540 | 3 (0)| 00:00:01 |
    |* 9 | INDEX RANGE SCAN | BIGINDEX_1 | 3 | | 2 (0)| 00:00:01 |
    | 10 | TABLE ACCESS BY INDEX ROWID | BIG_OBJECTS | 3 | 168 | 6 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    6 - filter(ROWNUM<=10)
    8 - access("OWNER"='SYS' AND "OBJECT_TYPE"='INDEX')
    9 - access("OWNER"="OWNER" AND "OBJECT_TYPE"="OBJECT_TYPE" AND "CREATED"="CREATED")
    Statistics
    1 recursive calls
    0 db block gets
    26 consistent gets
    0 physical reads
    0 redo size
    1281 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    10 rows processed
    I made this comparison with the Oracle versions 10.2 and 11.2 and the result was more or less the same. How can I change the rank() query in a way that only the small number of really needed blocks are read from the database?

    this was exactly the hint, I was looking for. Generally speaking hints are not the preferred way to go to tune queries. They can have nasty side-effects when data changes.
    Now the rank()-query is similar fast and much better to read than my fast one with three nested SELECTs.
    Your rownum query was needlessly complicated, and could be simplified to:
    select owner, object_type, object_name, object_id, status, created
    from (select owner, object_type, created
          from big_objects
          where owner = 'SYS' and
                object_type = 'INDEX'
          order by created desc)
    where rownum <= 10
    order by created ascand very likely get the same speed.
    One more question. How did you format those sql queries and results. When I copy/paste them into the editor of forums.oracle.com the format allways gets lost.To preserve formatting use {noformat}{noformat} before and after the section you want ot keep formatted.  In general, if you want to see how someone generated an effect, reply to the post and hit the quote original icon.  You will see all the formatting codes used in the original.
    John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Rank function taking too long

    I am running the below query. This query runs fine. However, if I uncomment the
    "rank() over(partition by CONCAT_DATE,VARIABLE_ID order by VARIABLE_VALUE) RANK" and
    "B.rank=1" , the query takes a very long time to execute...takes about 6-7 minutes
    instead of 20 seconds(when the rank part is commented out). Is there any other way to speed
    this up as I needed the one with the lowest rank.
    Thanks
    SELECT
    EXAMCODE,
    STARTDATE,
    REVDATE,
    ENDDATE,
    VARIATION ,
    GROUPNAME,
    PLAN,
    STDPLAN,
    CORPPLAN,
    PRODUCT,
    PES,
    CONCAT_DATE,
    NOTE_ID,
    MAJ_HDG_ID,
    MAJ_HDG_TXT,
    MIN_HDG_ID,
    MIN_HDG_TXT,
    VARIABLE_ID,
    VARIABLE_DESC,
    PROVIDERCODE,
    VARFORMAT,
    NOTE_NAME,
    MAJHEADNGNOTE,
    MINHEADNGNOTE,
    VARIABLENOTE,
    VARIABLE_VALUE
    FROM(
    SELECT
    EXAMCODE,
    STARTDATE,
    REVDATE,
    ENDDATE,
    VARIATION ,
    GROUPNAME,
    PLAN,
    STDPLAN,
    CORPPLAN,
    PRODUCT,
    PES,
    CONCAT_DATE,
    NOTE_ID,
    MAJ_HDG_ID,
    MAJ_HDG_TXT,
    MIN_HDG_ID,
    MIN_HDG_TXT,
    VARIABLE_ID,
    VARIABLE_DESC,
    PROVIDERCODE,
    VARFORMAT,
    NOTE_NAME,
    MAJHEADNGNOTE,
    MINHEADNGNOTE,
    VARIABLENOTE,
    VARIABLE_VALUE --,
    -- rank() over(partition by CONCAT_DATE,VARIABLE_ID order by VARIABLE_VALUE) RANK
    FROM
    SELECT
    EXAM_DIM2.EXAM_CODE EXAMCODE,
    to_char(START_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') STARTDATE,
    to_char(REV_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') REVDATE,
    to_char(END_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') ENDDATE,
    VARIATION_DIM2.VARIATION_ID VARIATION ,
    EXAM_DIM2.GROUP_NAME GROUPNAME,
    EXAM_DIM2.BENEFIT_PLAN_NAME PLAN,
    EXAM_DIM2.STANDARD_PLAN_NAME STDPLAN,
    EXAM_DIM2.CORPORATE_PLAN_NAME CORPPLAN,
    EXAM_DIM2.PRODUCT_NAME PRODUCT,
    STRUCTURE_DIM2.STRUCTURE_NAME PES,
    EXAM_DIM2.EXAM_CODE || ' - ' || to_char(START_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') || ' - ' || nvl(to_char(REV_DATE_DIM2.FULL_DATE,'MM/DD/YYYY'),'N/A')|| ' - ' || to_char(END_DATE_DIM2.FULL_DATE ,'MM/DD/YYYY') CONCAT_DATE,
    NOTES_DIM2.NOTE_ID NOTE_ID,
    DECODE (MAJOR_HEADING_DIM2.HEADING_ID ,null,HEADING_DIM2.HEADING_ID,MAJOR_HEADING_DIM2.HEADING_ID) MAJ_HDG_ID ,
    DECODE (MAJOR_HEADING_DIM2.HEADING_ID ,null,HEADING_DIM2.HEADING_TEXT,MAJOR_HEADING_DIM2.HEADING_TEXT) MAJ_HDG_TXT ,
    DECODE(HEADING_DIM2.PARENT_HEADING_ID,null,'',HEADING_DIM2.HEADING_ID) MIN_HDG_ID,
    DECODE(HEADING_DIM2.PARENT_HEADING_ID,null,'',HEADING_DIM2.HEADING_TEXT) MIN_HDG_TXT,
    VARIABLE_DIM2.VARIABLE_ID VARIABLE_ID,
    VARIABLE_DIM2.VARIABLE_SHORT_DESCRIPTION VARIABLE_DESC,
    VARIABLE_DIM2.PROVIDER_ARRANGEMENT_CODE PROVIDERCODE,
    VARIABLE_DIM2.VARIABLE_FORMAT_CODE VARFORMAT,
    NOTES_DIM2.NOTE_NAME NOTE_NAME,
    '' as MAJHEADNGNOTE,
    '' as MINHEADNGNOTE,
    DBMS_LOB.SUBSTR(NOTES_DIM2.NOTE_TEXT,DBMS_LOB.GETLENGTH(NOTES_DIM2.NOTE_TEXT) ,1) VARIABLENOTE,
    EXAM_INFO_FACT2.VARIABLE_VALUE VARIABLE_VALUE
    FROM
    MED_DM.DATE_DIM START_DATE_DIM2,
    MED_DM.DATE_DIM END_DATE_DIM2,
    MED_DM.DATE_DIM REV_DATE_DIM2,
    MED_DM.EXAM_DIM EXAM_DIM2,
    MED_DM.STRUCTURE_DIM STRUCTURE_DIM2,
    MED_DM.NOTES_FACT NOTES_FACT2,
    MED_DM.HEADING_DIM MAJOR_HEADING_DIM2,
    MED_DM.HEADING_DIM HEADING_DIM2,
    MED_DM.VARIABLE_DIM VARIABLE_DIM2,
    MED_DM.NOTES_DIM NOTES_DIM2,
    MED_DM.EXAM_INFO_FACT EXAM_INFO_FACT2,
    MED_DM.VARIATION_DIM VARIATION_DIM2
    WHERE
    ( EXAM_INFO_FACT2.EXAM_DIM_ID = EXAM_DIM2.EXAM_DIM_ID )
    AND ( VARIATION_DIM2.VARIATION_DIM_ID (+)= EXAM_INFO_FACT2.VARIATION_DIM_ID )
    AND ( EXAM_INFO_FACT2.STRUCTURE_DIM_ID = STRUCTURE_DIM2.STRUCTURE_DIM_ID)
    AND ( EXAM_DIM2.END_DATE_DIM_ID=END_DATE_DIM2.DATE_DIM_ID )
    AND ( EXAM_DIM2.REVISION_DATE_DIM_ID=REV_DATE_DIM2.DATE_DIM_ID )
    AND ( EXAM_DIM2.START_DATE_DIM_ID=START_DATE_DIM2.DATE_DIM_ID )
    AND ( HEADING_DIM2.HEADING_DIM_ID= EXAM_INFO_FACT2.HEADING_DIM_ID )
    AND ( MAJOR_HEADING_DIM2.HEADING_ID(+)=HEADING_DIM2.PARENT_HEADING_ID )
    AND ( EXAM_INFO_FACT2.VARIABLE_DIM_ID = VARIABLE_DIM2.VARIABLE_DIM_ID )
    AND ( EXAM_INFO_FACT2.EXAM_DIM_ID = NOTES_FACT2.EXAM_DIM_ID (+) )
    AND ( EXAM_INFO_FACT2.VARIABLE_DIM_ID = NOTES_FACT2.VARIABLE_DIM_ID (+))
    AND ( NOTES_FACT2.NOTE_DIM_ID = NOTES_DIM2.NOTE_DIM_ID (+))
    UNION ALL
    SELECT
    EXAM_DIM2.EXAM_CODE EXAMCODE,
    to_char(START_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') STARTDATE,
    to_char(REV_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') REVDATE,
    to_char(END_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') ENDDATE,
    '' as VARIATION,
    EXAM_DIM2.GROUP_NAME GROUPNAME,
    EXAM_DIM2.BENEFIT_PLAN_NAME PLAN,
    EXAM_DIM2.STANDARD_PLAN_NAME ,
    EXAM_DIM2.CORPORATE_PLAN_NAME CORPPLAN,
    EXAM_DIM2.PRODUCT_NAME PRODUCT,
    '' as PES,
    EXAM_DIM2.EXAM_CODE || ' - ' || to_char(START_DATE_DIM2.FULL_DATE,'MM/DD/YYYY') || ' - ' || nvl(to_char(REV_DATE_DIM2.FULL_DATE,'MM/DD/YYYY'),'N/A')|| ' - ' || to_char(END_DATE_DIM2.FULL_DATE ,'MM/DD/YYYY') CONCAT_DATE,
    MED_DM.NOTES_DIM.NOTE_ID NOTE_ID,
    DECODE (MAJOR_HEADING_DIM2.HEADING_ID ,null,HEADING_DIM2.HEADING_ID,MAJOR_HEADING_DIM2.HEADING_ID) MAJ_HDG_ID ,
    DECODE (MAJOR_HEADING_DIM2.HEADING_ID ,null,HEADING_DIM2.HEADING_TEXT,MAJOR_HEADING_DIM2.HEADING_TEXT) MAJ_HDG_TXT ,
    DECODE(HEADING_DIM2.PARENT_HEADING_ID,null,'',HEADING_DIM2.HEADING_ID) MIN_HDG_ID,
    DECODE(HEADING_DIM2.PARENT_HEADING_ID,null,'',HEADING_DIM2.HEADING_TEXT) MIN_HDG_TXT,
    VARIABLE_DIM2.VARIABLE_ID VARIABLE_ID,
    VARIABLE_DIM2.VARIABLE_SHORT_DESCRIPTION VARIABLE_DESC,
    VARIABLE_DIM2.PROVIDER_ARRANGEMENT_CODE PROVIDERCODE,
    VARIABLE_DIM2.VARIABLE_FORMAT_CODE VARFORMAT,
    MED_DM.NOTES_DIM.NOTE_NAME NOTE_NAME,
    (CASE WHEN ((HEADING_DIM2.PARENT_HEADING_ID is null) AND (NOTES_FACT.VARIABLE_DIM_ID is null))
    THEN DBMS_LOB.SUBSTR(MED_DM.NOTES_DIM.NOTE_TEXT,DBMS_LOB.GETLENGTH(MED_DM.NOTES_DIM.NOTE_TEXT),1)
    ELSE
    END) as MAJHEADNGNOTE,
    -- DECODE(HEADING_DIM2.PARENT_HEADING_ID,null,DBMS_LOB.SUBSTR(MED_DM.NOTES_DIM.NOTE_TEXT,DBMS_LOB.GETLENGTH(MED_DM.NOTES_DIM.NOTE_TEXT),1),'') MAJHEADNGNOTE,
    -- DECODE(HEADING_DIM2.PARENT_HEADING_ID,null,'',DBMS_LOB.SUBSTR(MED_DM.NOTES_DIM.NOTE_TEXT,DBMS_LOB.GETLENGTH(MED_DM.NOTES_DIM.NOTE_TEXT),1)) MINHEADNGNOTE,
    (CASE WHEN ((HEADING_DIM2.PARENT_HEADING_ID is not null) AND (NOTES_FACT.VARIABLE_DIM_ID is null))
    THEN DBMS_LOB.SUBSTR(MED_DM.NOTES_DIM.NOTE_TEXT,DBMS_LOB.GETLENGTH(MED_DM.NOTES_DIM.NOTE_TEXT),1)
    ELSE
    END) as MINHEADNGNOTE,
    (CASE WHEN (NOTES_FACT.VARIABLE_DIM_ID is not null)
    THEN DBMS_LOB.SUBSTR(MED_DM.NOTES_DIM.NOTE_TEXT,DBMS_LOB.GETLENGTH(MED_DM.NOTES_DIM.NOTE_TEXT),1)
    ELSE
    END) as VARIABLENOTE,
    --DECODE(NOTES_FACT.VARIABLE_DIM_ID,null,DBMS_LOB.SUBSTR(MED_DM.NOTES_DIM.NOTE_TEXT,DBMS_LOB.GETLENGTH(MED_DM.NOTES_DIM.NOTE_TEXT),1),'') VARIABLENOTE,   
    '' as VARIABLE_VALUE
    FROM
    MED_DM.DATE_DIM START_DATE_DIM2,
    MED_DM.DATE_DIM END_DATE_DIM2,
    MED_DM.DATE_DIM REV_DATE_DIM2,
    MED_DM.EXAM_DIM EXAM_DIM2,
    MED_DM.NOTES_FACT,
    MED_DM.HEADING_DIM MAJOR_HEADING_DIM2,
    MED_DM.HEADING_DIM HEADING_DIM2,
    MED_DM.VARIABLE_DIM VARIABLE_DIM2,
    MED_DM.NOTES_DIM
    WHERE
    ( MED_DM.NOTES_DIM.NOTE_DIM_ID=MED_DM.NOTES_FACT.NOTE_DIM_ID )
    AND ( MED_DM.NOTES_FACT.VARIABLE_DIM_ID=VARIABLE_DIM2.VARIABLE_DIM_ID (+) )
    AND ( MED_DM.NOTES_FACT.EXAM_DIM_ID=EXAM_DIM2.EXAM_DIM_ID )
    AND ( HEADING_DIM2.HEADING_DIM_ID=MED_DM.NOTES_FACT.HEADING_DIM_ID )
    AND ( EXAM_DIM2.END_DATE_DIM_ID=END_DATE_DIM2.DATE_DIM_ID )
    AND ( EXAM_DIM2.REVISION_DATE_DIM_ID=REV_DATE_DIM2.DATE_DIM_ID )
    AND ( EXAM_DIM2.START_DATE_DIM_ID=START_DATE_DIM2.DATE_DIM_ID )
    AND ( MAJOR_HEADING_DIM2.HEADING_ID(+)=HEADING_DIM2.PARENT_HEADING_ID )
    AND ( MED_DM.NOTES_FACT.HEADING_DIM_ID is not null)
    )B
    WHERE B.EXAMCODE ='G971' and B.STARTDATE = '10/01/2002'
    --and B.RANK =1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    There are probably lots of things you could do to improve the performance of this query. The first thing I would try is applying the filter criteria to each query in the "union all" rather than to the final set of results. The way it is working now is that the inner queries are ranking and returning all rows for all exam codes and all start dates (likely thousands if not millions of rows). Only after all rows have been ranked are the results filtered for the desired examcode.
    Try something like:
    select * from (
      select ...rank() over(...) rnk from (
        select ... from ...
          where examcode='G971' and startdate=to_date('10/02/2002','MM/DD/YYYY') ...
        union all
        select ... from ...
          where examcode='G971' and startdate=to_date('10/02/2002','MM/DD/YYYY') ...
    ) where rnk = 1Also, indexes on examcode and/or startdate might help, if they don't already exist.

  • Improving performance of scripts in a PDF form

    Hello there.  I'm a bit new to the scripting in Acrobat and find myself with a complex form that has a number of instances (about 70)  of the following script (specific to individual fields):
    event.value=this.getField("Ranks").value + this.getField("Mod").value + this.getField("MiscMod").value;
    var trained = "Untrained";
    var skill = "Ranks";
    if ( (this.getField(trained).value != "On" ) && (this.getField(skill).value < 1)) {
    event.target.textColor = ["G", 1]; }
    else {event.target.textColor = ["G", 0];}
    The code works fine, but with this many instances, performance of form is sluggish while updating. In addition, there are approximately 200 simple addtion fields being used.
    I'm looking for any advice, scripting or otherwise, to help improve performance.
    Thanks so much in advance.

    If you create a function in the document scripts :
    function updateField() {
    event.value=this.getField("Ranks").value + this.getField("Mod").value + this.getField("MiscMod").value;
    var trained = "Untrained";
    var skill = "Ranks";
    if ( (this.getField(trained).value != "On" ) && (this.getField(skill).value < 1)) {
    event.target.textColor = ["G", 1]; }
    else {event.target.textColor = ["G", 0];}
    you could replace the code in each field with the following function call, and they would all use the same code:
    updateField()
    Without knowing exactly what 'slightly different code'' entails, you can add parameters to the function call:
    function updateField(Rank, Mod, MiscMod) {
    event.value= Rank + Mod + MiscMod;
    var trained = "Untrained";
    var skill = "Ranks";
    if ( (this.getField(trained).value != "On" ) && (this.getField(skill).value < 1)) {
    event.target.textColor = ["G", 1]; }
    else {event.target.textColor = ["G", 0];}
    and you could call it in each field with different values for 'Rank', 'Mod', and 'MiscMod' (or whatever parameters you use) like this:
    updateField(getField("Ranks").value, this.getField("Mod").value, this.getField("MiscMod").value )
    or
    updateField(getField("aDifferentRanks").value, this.getField("aDifferentMod").value, this.getField("aDifferentMiscMod").value )
    or
    updateField(47, 12, 45)
    If you need to make changes, you only need to change the 'updateField' function once, and any field which calls it will use the updated code.

  • Rank in QaaWS not working correctly?

    Hi,
    I am trying to integrate a simple Top 10 customers query in XCelsius using QaaWS:
    I've  built a simple universe on MS AdventureWorksDW Sample Database.
    Using this universe, I've built a QaaWS using dimension Name, measure Sales amount (sorting on Sales amount).
    I added an Rank filter to show top 10 Name based on Sales amount.
    Until now everything ok.
    Since I want a year filtering in XCelsius, I added a CalendarYear Inlist filtering using prompt.
    Now, everytime I use a subset of complete year range (say, only one year), results are not correct. It seems that not all rows are evaluated correctly (compared with WebI, Names are missing).
    If I use only year filter, results are correct, but then a lot of rows are transmitted to XCelsius and decrease performance.
    The issue is not an XCelsius one, since I see the problem already in Query as a Web Service  preview.
    I am using Query as a Web Service 12.1.2000.882.
    Does anybody know about this issue and maybe how to resolve? If not, what would be a good approach to debug? I would like to see QaaWS generated SQL.
    Regards,
    Stefan

    Hello David,
    I use an OLE DB connection to a MS SQL Server 2005.
    Connection Details say:
    Version 2.0.0.29
    Build 12.1.0.882
    Network Layer OLE DB
    DBMS Engine MS SQL Server 2205
    Database used is MS AdventureWorksDW sample database (data warehouse sample)
    I noticed that only with this database, ranking is selectable (not with the AdventureWorks non-DW sample database).
    Ranking itself seems to work, if I activated ranking (e.g. Top 10 customers) everything is ok.
    (Also if I  send a direct SQL command with ranking to the DBMS, it seems ok.)
    Issue arise if I add year filter. Combination of rank and year filter does not seem to work properly.
    Any idea why? Or do you wanted to say that this issue might also be related to DBMS support? I would hope / expect to get a straight "ranking not supoorted" and not incorrect data back ...
    Thanks for your answer anyway!
    Regards,
    Stefan

Maybe you are looking for

  • No Signal W/ Line In

    I have a powerbook aluminum 1.5 ghz and i'm having trouble getting the line in to work all the time. only one of my friends 1/4 inch to 1/8 inch adapters will seem to work properly. and now my plantronics headset will not pick anything up. The Headse

  • Agp Or Vga?

    My games got crashed, First i see broken polygons. i got: msi Gf 4200 4x 128m. msi nforce2 isrl 512m kingston 333 cl2.5 @400 barton 2500 @3200 without overclock is the same. i tryied with 2x a time ago , without sba or fastwrite, and works  fine, (a

  • MacBook seems to run hot

    My new MacBook Pro seems to run hot.  Only have Safari with one window and Finder running.  Is this normal?

  • .pps attachments not opening "wholly"?

    Whenever friends send me an email with a .pps attachment, I click on it and Keynote opens. On the opening page, sometimes there are credits showing the name of a piece of music, presumably to be played while watching the slide show. I am using the "T

  • Screen Recording - no sound

    Hi all, When I attempt to make a screen recording, the saved recording doesn't have any sound. I have confirmed that both my built-in microphone and an external mic were bringing sound into the system while the screen recording was happening -- I had