Constant Selection - Performance hit ?

Hi,
I would like to know about the effect of using 'constant selection' on query performance?
I have a resricted key figure, restricted by 6-7 characteristics, with 'constant selection' marked for all of these. I have about 10 RKFs like this in the query definition.
How does this affect the performance. I read somewhere, but dont remember, that infact it slows down...Would like to hear what experts in there think about this.
Thanks alot
Gova

With Constant Selection, the restrictions in the key figure are NOT affected by the navigation and filters.
Shooting from the hip, I would say performance impact really depends on the restrictions of your constant selection vs other navigations/filters.
If your constant selection restrictions are much less restrictive than other navigations/filters, the query has to read the larger amount of data to satisfy the constants, e.g. you query a particular Bus Area, but RKFs with constant selection do NOT include the Bus Area filtering, the query will have to read all Bus Areas.

Similar Messages

  • Performance hit using "where" clause in the query

    Hi All,
    I am facing a huge performance hit in the java code when using "where" clause in queries. Following are the details:
    1. SELECT * FROM Employee
    2. SELECT * FROM Employee where employeeid in (26,200,330,571,618,945)
    There is no difference in Query Execution Time for both queries.
    Business Logic Time is huge in second case as compared to first one (ratio - 1:20).
    Rows returned are more in first case as compared to second case.(ratio - 1:4)
    Business Logic is same for both the cases where I iterate through the ResultSet, get the objects and set them in a data structure.
    Does anybody know the reason of unexpected time difference for the business logic in the second case?

    Since you're mentioning clustering your index, I'll assume you are using Oracle. Knowing what database you are using makes it a lot easier to suggest things.
    Since you are using Oracle, you can get the database to tell you what execution plan it is using for each of the 2 SQL statements, and figure out why they have similar times (if they do).
    First, you need to be able to run SQL*Plus; that comes as part of a standard database installation and as part of the Oracle client installation - getting it set up and running is outside the scope of this forum.
    Second, you may need your DBA to enable autotracing, if it's not already:
    http://asktom.oracle.com/~tkyte/article1/autotrace.html
    http://www.samoratech.com/tips/swenableautotrace.htm
    Once it's all set up, you can log in to your database using sql*plus, issue "SET AUTOTRACE ON", issue queries and get execution plan information back.
    For example:
    SQL> set autotrace on
    SQL> select count(*) from it.ticket where ticket_number between 10 and 20;
      COUNT(*)
            11
    Execution Plan
    Plan hash value: 2983758974
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            |     1 |     4 |     1   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE   |            |     1 |     4 |            |          |
    |*  2 |   INDEX RANGE SCAN| TICKET_N10 |    12 |    48 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("TICKET_NUMBER">=10 AND "TICKET_NUMBER"<=20)
    Statistics
              0  recursive calls
              0  db block gets
              1  consistent gets
              0  physical reads
              0  redo size
            515  bytes sent via SQL*Net to client
            469  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> This tells me that this query used an INDEX RANGE SCAN on index TICKET_N1; the query can't do much better than that logically... In fact, the statistic "1 consistent gets" tells me that Oracle had to examine only one data block to get the answer, also can't do better than that. the statistic, "0 physical reads" tells me that the 1 data block used was already cached in Oracle's memory.
    the above is from Oracle 10g; autotrace is available back to at least 8i, but they've been adding information to the output with each release.
    If you have questions about sql_plus, check the forums at asktom.oracle.com or http://forums.oracle.com/forums/category.jspa?categoryID=18
    since sql*plus is not a JDBC thing...
    Oh, and sql*plus can also give you easier access to timing information, with "set timing on".

  • Performance Hit Due to NVL() Function

    Hi,
    I am from dev project team,we are facing a performance hit due to NVL() function,pls give a solution to resolve this issue.
    the below is my function which i created to calculate some efforts.
    create or replace function check_function(
    v_deal_detail ,
    v_tower ,
    v_subtower,
    v_location ,
    v_client_role ,
    v_emp_category ,
    v_year ,
    v_state )
    return number
    is
    v_trans_offshore_efforts number(30,8) default 0;
    v_stdy_offshore_efforts number(30,8) default 0;
    begin
    if v_state =1
    or v_state is null
    then
    begin
    select nvl(sum(decode (d.loc_type_id,
    crmuat_global_constant_pkg.GLB_OFFSHORE,
    s.trans_efforts,
    0)),0)
    into v_trans_offshore_efforts
    from prc_calc_trans_fte_dtls_t s, prc_deal_dtl_loc_dtls_t d
    where s.deal_detail_id= d.deal_detail_id
    and s.tower_id = d.tower_id
    and s.location_id = d.location_id
    and s.deal_detail_id = v_deal_detail
    and s.client_role_id = nvl(v_client_role,s.client_role_id)
    and s.emp_category_id = nvl(v_emp_category,s.emp_category_id)
    and s.tower_id = v_tower
    and s.subtower_id = nvl(v_subtower,s.subtower_id)
    and s.location_id = nvl(v_location,s.location_id)
    and s.year_no = v_year;
    exception
    when no_data_found
    then
    v_trans_offshore_efforts := 0;
    end;
    end if;
    if v_state = 1
    then
    return v_trans_offshore_efforts;
    end if;
    end;
    pls give me a solution.
    Regards,
    shinu

    {message:id=9360003}

  • Constant Selection in BEx Query Designer on BI7

    Hi guys
    According to this blog <a href="/people/prakash.darji/blog/2006/09/19/the-hidden-secret-of-constant-selection Selection</a>, we can create constant selection on both Characteristics and Key figures. I understand how to do it with restricted key figures.
    Can anyone give me a step by step guide on how to create constant selection for a Characteristic in BEx Query Designer on BI7. I can't find options for 'constant selection'
    Or is this the same thing when you include or exclude values?
    Message was edited by:
            jimi ogun

    Thanks Krishna
    I am actually using a Multiprovider for my queries but business requirements mean I need to create joins.
    I am trying to avoid Infosets and I believe another way is to use the Constant Selection feature in Query Designer.
    Going back to my previous posting, I know how this is done with a restricted KF but I don't know how when it comes to characteristics.
    Can anyone help?

  • Performance Hit After Oracle Database Upgrade to 10.2.0.4

    We have a couple dozen workbooks that took this performance hit after the upgrade of the database/migration to a new server. Worksheets that executed in the ten second range are now running for hours or simply not finishing. We took the new server factor out of the equation by rolling back the database to 10.2.0.3 where a test EUL resides and the problem was resolved. Has anyone seen this issue? Does anyone have an suggestions? An early reply would be greatly appreciated.
    Thanks,
    Jerre

    Rod,
    Thanks for the quick reply. We are looking at the different plans and modifying the optimizer settings, switching back and forth, as we speak. We are now starting with the hints. Currently our Server 'optimizer_mode' parameter is ALL_ROWS. We are planning to change the to 'Choose' and see what happens. The workbooks that are impacted are on our oldest business areas of Finance and HR. The former setup was borrowed from another school for a quick, low cost start up. The latter was thrown together by novices. Our true datamarts developed by knowledgeable personnel with star schemas are not impacted. Of course we are planning on redoing the older business areas but time, personnel and money matters slow things down. It is these workbooks on the older business areas that are greatly affected by the migrations and upgrade. We eventually get things to settle down but past actions do not always have the same resolution with newer and better servers and upgrades.
    Thanks,
    Jerre

  • How can I run two independant LabView applications from the same computer, without taking a performance hit?

    I have two identical, but independant test stations, both feeding data back to a Data Acquisition Computer running LabView 6.1. Everything is duplicated at the computer as well, with two E-series multifunction I/O cards (one for each test station) and two instances of the same LabView program for acquiring and analysing the data. The DAQ computer has a Celeron processor w/ 850Mhz clock and 512MB memory, and is running on Windows NT.
    I have noticed that when I run both the applications simultaneously, I take a substantial performance hit in terms of processing speed (as opposed to running just one program). Why does this happen and how can I prevent it? (In t
    his particular case, it may be possible to combine both the tests into one program since they are identical, but independant, simultaneous control of two different LabView programs is a concept I need to prove out).
    Thanks in advance for any tips, hints and spoon feedings (!)....

    Depending on your application, you may or may not be able to improve things.
    Firstly, each task requires CPU time, so a certain performance difference is guaranteed. Making sure you have a "wait until ms" in every while loop helps in all but the most CPU intensive programs.
    Secondly, if you are
    1) streaming data to disk
    2) Acquiring lots of data over the PCI bus
    3) Sending lots of data o ver the network
    you can have bottlenecks elsewhere than in your program (limited Disk, PCI or Network bandwidth).
    Avoid also displaying data which doesn`t need to be displayed. An array indicator which only shows one element still needs a lot of processing time if the array itself is large.... Best is to set the indicator invisible if this is the case.
    I think
    it would be best if you could give some more information about the amount of data being acquired, processed and sent. Then maybe it will be more obvious where you can optimise things. If you are running W2000, try activating the task manager while the program(s) are sunning to see where the bottleneck is.
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • How an INDEX of a Table got selected when a SELECT query hits the Database

    Hi All,
    How an Index got selected when a SELECT query hits the Database Table.
    My SELECT query is as ahown below.
        SELECT ebeln ebelp matnr FROM ekpo
                       APPENDING TABLE i_ebeln
                       FOR ALL ENTRIES IN i_mara_01
                       WHERE werks = p_werks      AND
                             matnr = i_mara_01-matnr AND
                             bstyp EQ 'F'         AND
                             loekz IN (' ' , 'S') AND
                             elikz = ' '          AND
                             ebeln IN s_ebeln     AND
                             pstyp IN ('0' , '3') AND
                             knttp = ' '          AND
                             ko_prctr IN r_prctr  AND
                             retpo = ''.
    The fields in the INDEX of the Table EKPO should be in the same sequence as in the WHERE clasuse?
    Regards,
    Viji

    Hi,
    You minimize the size of the result set by using the WHERE and HAVING clauses. To increase the efficiency of these clauses, you should formulate them to fit with the database table indexes.
    Database Indexes
    Indexes speed up data selection from the database. They consist of selected fields of a table, of which a copy is then made in sorted order. If you specify the index fields correctly in a condition in the WHERE or HAVING clause, the system only searches part of the index (index range scan).
    The primary index is always created automatically in the R/3 System. It consists of the primary key fields of the database table. This means that for each combination of fields in the index, there is a maximum of one line in the table. This kind of index is also known as UNIQUE. If you cannot use the primary index to determine the result set because, for example, none of the primary index fields occur in the WHERE or HAVING clause, the system searches through the entire table (full table scan). For this case, you can create secondary indexes, which can restrict the number of table entries searched to form the result set.
    reference : help.sap.com
    thanx.

  • Performance hit when using a FirePro GPU?

    Hey there!
    I'm interested in purchasing a cheap ATI FirePro V4900 or similar GPU in order to take advantage of my 10 bit TFT when using Photoshop. I was wondering if I have to expect a performance hit when using PS 6.0 with such a card as opposed to a normal "gamer" GPU like the NVidia 670 GTX when :
    - performing normal file handling, opening PSD files, paning, zooming, brushing, etc.
    - applying some of the newer GPU-enhanced filters like Liquify, Oil Paint, Iris Blur, 3d enhancements, etc.
    - actually applying/rendering a more demanding fliter such as Iris Blur?
    Does anyone know about this? I'm afraid I could not find any benchmarks at all except for the one on Tomshardware regarding OCL, but that one does not include professional GPUs...
    Thanks for any info in advance!

    There will not be synchronization when the method of A
    is being called. The method 1) certainly saves memory
    space, but will the performance be hurt since there
    will only be one object accessed by multiple threads?
    Or maybe it doesn't matter?If there is no synchronization, it will not matter. Threads execute methods. Methods do not run on Objects. The Object is just data that is implicitly linked to the method.
    Just make sure it's safe to keep the method unsynchronized.

  • Constant Selection on MultiProvider is not working properly

    Hi All,
    We have a MP based on 2 DSOs, say DSO1 & DSO2.
    DSO1: Char 1, Char 2, Char 3 and KF1
    DSO2: Char 1, Char 2, Char 4 and KF2.
    Now, I am creating a query by using constant selection. I have kept all chars in Rows pane and 2 KF in Columns pane. I have restricted KF1 with char 4 and KF2 with char 3 by putting constant selection accordinlgy... However,  still I am getting 2 rows of display as below...
    char1     char   2    cahr 3      char 4          kf1             kf2
    A           B              C             #                 10              -----
    A           B              #             D                 ----              10
    Could any one pls suggest how to display in  single record... Your help is highly appreciable.
    Best Regards
    Venkat...

    Thank you Anshu for your suggestion.
    Here, I wrongly mentioned the KF details. Both the KFs are existed in both DSO1 & DSO2. The only thing is DSO1 data is coming from ECC(R/3) and DSO2 data is coming from CRM. Now, I want to show the all chars w.r.t infoprovider wise KF vaues in a single row. Shall we achieve it by constant selection approach? Could you suggest any work around please...
    Best Regards
    Venkat...

  • Constant selection in query designer

    hi guys
    please explain abut
    constant selection in query designer 7.o

    Hi,
    For ex if you had designed a MP using the IC's and  DSO's in which if all the fields are not in common with both the info provides used in the MP you will get the results in 2 rows and the values for the ones which are not in common will be displayed as # in the results.
    This can be the case in Infosets as well.
    to over come this we use "constant selection"
    Check the below link which explain the constant selection with an example.
    http://sapbi101.blogspot.com/2010/05/constant-selection-in-query-apples-and.html

  • Problem with 0FIGL_VC1 when use constant selection in the query

    Please kindly help me. I have this problem for 2 weeks already.
    When I create a query from virtual cube 0FIGL_VC1 (balance sheets / p&l statements), if I use constant selection in any of key figure, my report could not display financial statment correctly. 
    My report layout
    Columns :  key figures  (including 0FIGL_VC1_CK001)
    Rows:  0GLACCEXT  (financial statement item) << as hierarchy
    Initially, the query is processed correctly.
    However, based on the requirement from my customer, I really have to use "constant selection" for some of my columns. Whenever I do so, the query display incorrectly. (Some nodes of financial statement item just disappear. (it seem like all contra item will disappear.)  
    Please help!

    If I dont use constant selection in the query, data are display correctly.
    But If I use constant selection in the query, some financial statement item dont display any value
    Example :
       Financial statement item(Display in hier)     Period1   Total Period1(Constant selection)
                 A                                                       10            60
                 B                                                       20            60
                 C                                                       30            60
                 D                                                       0              60
    - Financial statement item "D"  has some value.
    - Financial statement item "D"  is in the hierarchy,one gl account has been assigned to more than one group differentiated by debit/credit indicator.
    Please help!!

  • Constant selection and authorizations

    Hi,
    I've made a query for displaying some selected figures for our company's health and safety managers.
    The query is displayed with 0DF_FORCE in the rows as a hierachy and in addition to needing a role for displaying the query at all, the users are restricted to "their" part of the hierarchy using an exit variable with lookup in a nav-attribute to 0DF_FORCE. This all works fine, the problem is that I want to use the number of workdays in a given month for sickleave % calculations. I tried making a formula variable exit for this that will return the number of workdays in an variable intervall given at query start. This works, but I'm then not able to drill the query to spesific months, since the formula variable does not respond to calmonth.
    Alternativly I tried putting the number of workdays into a DSO and linking to calmonth there. That solves the navigation, but now I have a problem with constant selection. I need the number of workdays for every force element in 0DF_FORCE. Since the DSO does not contain this characteristic, it needs constant selection '#' on 0DF_FORCE within the restricted keyfigure for workdays. And here's the catch, the intended users do not have and cannot have authorization for force element '#'.
    I would appriciate any leads on developing my current logic, or a new tack for displaying number of workdays pr month without conflicting with said authorization limitations.

    SAP haveth in their glory created 0numwday as an attribute to 0calmonth as of jan '08. That they haven't documented it at all, did that it took some time to discover, but that's bygones. What it means is that I can make a replacement path variable on 0calmonth instead of my keyfigure and avoid the whole issue. Hurrah!

  • Constant Selections and Exception Aggregation

    Hi,
    Can You please tell me
    1) what is constant selections?
    2) what is Exception Aggregations?
    Thanks and Regards.
    Naresh.

    Hi,
    example for the use of standard aggregation and exception aggregation for a key figure is a key figure for the non-cumulative value
    with non-cumulative values such as warehouse stock, you want to total up the warehouse stock for various articles and warehouses (standard aggregation), but for the month you want to determine the ending inventory (LAST aggregation) (exception aggregation in regard to the time characteristic Calendar Month)
    for more info go through the below link
    http://help.sap.com/saphelp_nw04/helpdata/EN/d2/e0173f5ff48443e10000000a114084/content.htm
    For constant selection go through the belwo link
    http://help.sap.com/saphelp_nw70/helpdata/EN/46/91f0f090ea13e8e10000000a155369/content.htm
    Regards,
    Marasa.

  • Constant selection and Reusability

    Hi Gurus,
    In BI 7.0,I am facing following problem.
    1.I am using characteristic say ZSITE as constant selection and we use the data in a particular report.
    In Other report we are using ZSITE and expected to see different data but we are getting constant selection data.
    Is there any way that characteristics can be used differently in different reports?If so can anybody give me some idea please.

    Hi Nrupal
    you are talking abt constant selection in transformation/UR/TR or in Bex. If it is hard coded constant in Back-end then the same value will be used in all query as it is attribute.
    if you are putting constant selection in query then i guess it shouldn't be a problem because you define the constant selection in KF property locally in query designer.
    Thanks
    Tripple k

  • Constant selection issue

    Hi all,
    I have a request to create a query on a multiprovider and show characteristics that are only  in one of the 2 basic cubes as in the example:
    in cube a, I have the following data:
    Material    Sold-to  Bill_Number Qty
    A1415R   100123   600019      100
    in cube b, I have the following data:
    Sold-to    User    Bill_Number Amount
    100123   AK523  600019      50
    I want to see characteristics from the 2 basic cubes in the query like this, using as selection criteria, the material:
    Material    Sold-to  User       Bill_Number Qty  Amount
    A1415R   100123   AK523   600019      100   50
    I have tried with constant selection on characteristic 0INFOPROV and it works if I remove from drill down the characteristic "user", but whenever I drill down on user, the query shows all possible users in cube B:
    Material Sold-to  User    Bill_Number Qty  Amount
    A1415R   100123   AK523   600019      100   50
                      EM258   600019      100
                      MP296   600019      100
                      LY212   600019      100
                      JK688   600019      100
                      DH693   600019      100
    In the query I select Qty from cube A and characteristic 0INFOPROV as "constant selection" and also "display values not posted"
    for Amount, I select characteristic 0INFOPROV as "constant selection".
    Is there anyway to solve this? what am I doing wrong?
    Any input will be highly appreciate it.

    Hi Meric,
    thanks for your answer but it doesn´t work
    It shows all data from cube that has no material and 2 lines from the cube with materials ( the 2 lines from the material selected in the screen).
    Regards,
    Elena

Maybe you are looking for