Query with logical DB KDF

How can I obtain the value of the field LFA1-EMNFR?

Hi,
You could use the <b>GET LFA1</b> statement to evaluate LFA1-EMNFR. Try something like:
<b>
GET lfa1.
WRITE lfa1-emnfr.
</b>
The LDB driver program would automatically fill the work area of LFA1 and make it available for you in your program. You could then manipulate it as you need. Hope this helps.
Regards

Similar Messages

  • ABAP query using logical database KDF is not populating custom fields

    Hi Experts ,
    I created two following queries
    1.       VENDORCATKDF – uses KDF logical database
    2.       VENDORCATLFA1 – uses table = LFA1
    I’m pulling the same information in both queries:
    ·         Vendor Number
    ·         Country
    ·         Vendor Name
    ·         Vendor Category  (custom fields added to LFA1)
    The results for the query that uses the logical database KDF is incorrect.  It doesn’t pull in the flag on the custom field LFA1-ZMRO.   Even though the logical database KDF is made up of the table LFA1 and has these fields. 
    Is there something that can be done – so that all of these “custom” category fields under LFA1 (such as LFA1-ZZMRO) – get pulled into queries – when we use the logical database KDF ?

    Hi,
    I have got the error removed by ensuring that fields from one table are a part of one line ( taking help of ruler) only. But the underlying problem remains, the output is not ALV but List output.
    I do not think having additional fields in the query is reason for this.
    Is it bcoz iI am adjusting the output length of columns to ensure no hierarchical error ?
    Can we not have a query using LDB which is shown as SAP List?
    Regards,
    Garima.

  • SAP Query with Logical databse BRM

    Hi All,
    I'm developing one report by SAP Query using with logical database BRM to pick the accounting documents. But I would like add some kind of where condtion for one of field for BKPF table. Is there way to achieve this by using logical database concept? If there is a way please help me.
    Thanks in advance.
    Regards,
    TNR

    hi
    in SQVI, kindly follow the below steps:
    a.  in the left hand pane, click on the data fields.
    b.  expand the 'accounting document header'.
    c.  for the field BKPF-TCODE click on the 'List Fields' and the 'Selection fields'.
    d.  click on execute,
    e. you can now enter the values for the BKPF-TCODE.
    regards
    eashwar
    Edited by: eashwar1 on Feb 11, 2010 11:55 AM

  • SAP Query with Logical databse

    Hi All,
    I'm developing one report by SAP Query using with logical database BRM to pick the accounting documents. But I would like add some kind of where condtion for one of field for BKPF table. Is there way to achieve this by using logical database concept? If there is a way please help me.
    Thanks in advance.
    Regards,
    TNR

    hi
    in SQVI, kindly follow the below steps:
    a.  in the left hand pane, click on the data fields.
    b.  expand the 'accounting document header'.
    c.  for the field BKPF-TCODE click on the 'List Fields' and the 'Selection fields'.
    d.  click on execute,
    e. you can now enter the values for the BKPF-TCODE.
    regards
    eashwar
    Edited by: eashwar1 on Feb 11, 2010 11:55 AM

  • New fields for query with logical DB AFI

    Hello,
    I'm trying to change a Query (SQ01) that uses an infoset that gets the data from a logica DB (AFI), and I would like to include some fields that are not in that logical DB (VIQMFE-OTGRP, VIQMFE-OTEIL, VIQMFE-FEGRP, VIQMFE-FECOD).
    Any idea or manual to do this?
    Thanks a lot!

    Hi!
    I found the solution to this problem.
    In order to show some fields that are not of de BDL, in the Extra tab of infoSet, I insert additional information on node DIAUFK.
    In concrete for the fields that I need, I make a selection in QMFE table and insert the columns that I want.

  • UPDATE Query with logic applied

    Hi Experts,
    I need your help for now. Here is my requirement,
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production         
    PL/SQL Release 11.1.0.7.0 - Production                                         
    CORE     11.1.0.7.0     Production                                                     
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production                        
    NLSRTL Version 11.1.0.7.0 - Production                                         
    5 rows selected.
    DROP TABLE LINE_STATUS;
    DROP TABLE LINE_CHILD;
    CREATE TABLE LINE_STATUS
        LINE_ID     INTEGER     NOT NULL PRIMARY KEY,
        LINE_AMT    FLOAT,
        LINE_FLAG   INTEGER
    INSERT INTO LINE_STATUS VALUES(1,1.52,0);
    INSERT INTO LINE_STATUS VALUES(2,1.06,0);
    INSERT INTO LINE_STATUS VALUES(3,2.05,0);
    CREATE TABLE LINE_CHILD
        LINECHILD_ID        INTEGER NOT NULL PRIMARY KEY,
        LINECHILD_LINEID    INTEGER NOT NULL,
        LINECHILD_AMT       FLOAT
    INSERT INTO LINE_CHILD VALUES (100,1,0.50);
    INSERT INTO LINE_CHILD VALUES (101,1,0.50);
    INSERT INTO LINE_CHILD VALUES (102,2,1.00);
    INSERT INTO LINE_CHILD VALUES (103,2,0.05);NOW I NEED TO COLLECT THE SUM OF LINECHILD_AMT FOR EVERY LINECHILD_LINEID REFER LINE_STATUS(LINE_ID) AND TO CHECK
    THE VALUES ARE SAME, THERE CAN BE DIFFERENCE 0.01 THEN TO UPDATE LINE_STATUS(LINE_FLAG) VALUE.
    For Example:
    SELECT SUM(LINECHILD_AMT) FROM LINE_CHILD WHERE LINECHILD_LINEID=1
    Result is 1,
    CASE
        WHEN LINE_STATUS(LINE_AMT)!=SUM(LINECHILD_AMT) THEN 2
        WHEN LINE_STATUS(LINE_AMT) =(LINE_STATUS(LINE_AMT)<=-0.01 OR LINE_STATUS(LINE_AMT)>=0.01 THEN 1
    END CASE <<RESULT>>UPDATE LINE_STATUS,LINE_CHILD SET LINE_FLAG = CASE <<RESULT>> WHERE LINECHILD_LINEID= LINE_ID;
    How can i achieve this ?
    Thanks,

    This may not be the exact requirement as per as values of CASE statement is concern, but it should serve your purpose.
    SQL> select * from LINE_STATUS;
       LINE_ID   LINE_AMT  LINE_FLAG
             1       1.52          0
             2       1.06          0
             3       2.05          0
    SQL> SELECT * FROM  LINE_CHILD;
    LINECHILD_ID LINECHILD_LINEID LINECHILD_AMT
             100                1            .5
             101                1            .5
             102                2             1
             103                2           .05
    SQL> ed
    Wrote file afiedt.buf
      1  UPDATE LINE_STATUS
      2  SET LINE_FLAG=( WITH Sum_Line_Status AS ( SELECT LINE_ID S_LINE_ID,SUM(LINE_AMT) LINE_AMT_SUM
      3                                            FROM LINE_STATUS
      4                                            GROUP BY LINE_ID
      5                                          )
      6                  ,Sum_LINE_CHILD AS ( SELECT LINECHILD_LINEID S_LINECHILD_LINEID,
      7                                       SUM(LINECHILD_AMT) LINECHILD_AMT_SUM
      8                                       FROM LINE_CHILD
      9                                       GROUP BY  LINECHILD_LINEID
    10                                     )
    11                    SELECT
    12                       CASE WHEN ABS(LINE_AMT_SUM-LINECHILD_AMT_SUM)>0.01 THEN 2
    13                            WHEN LINE_AMT_SUM=LINECHILD_AMT_SUM THEN 1
    14                            WHEN ABS(LINE_AMT_SUM-LINECHILD_AMT_SUM)<=0.01 THEN 3
    15                       END
    16                    FROM   Sum_Line_Status,Sum_LINE_CHILD
    17                    WHERE  S_LINE_ID=S_LINECHILD_LINEID
    18                    AND  S_LINE_ID=LINE_ID
    19*                   )
    20  /
    3 rows updated.
    SQL> SELECT * FROM  LINE_STATUS;
       LINE_ID   LINE_AMT  LINE_FLAG
             1       1.52          2
             2       1.06          3
             3       2.05

  • How to create an ABAP Query with OR logical expression in the select-where

    Hi,
    In trying to create an ABAP query with parameters. So it will select data where fields are equal to the parameters entered. The default logical expression is SELECT.. WHERE... AND.. However I want to have an OR logical expression instead of AND.. how can I attain this??
    Please help me on this.. Points will be rewarded.
    Thanks a lot.
    Regards,
    Question Man

    Hi Bhupal, Shanthi, and Saipriya,
    Thanks for your replies. But that didn't answer my question.
    Bhupal,
    You cannot just replace AND with OR in an ABAP QUERY. ABAP QUERY is a self generated SAP code. You'll just declare the tables, input parameters and output fields to be displayed and it will create a SAP standard code. If you'll try to change the code and replace the AND with OR in the SAP standard code, the system will require you to enter access key/object key for that particular query.
    Shanthi,
    Yes, that is exactly what need to have. I need to retireve DATA whenever one of the conditions was satisfied.
    Saipriya,
    Like what I have said, this is a standard SAP code so we can't do your suggestion.
    I have already tried to insert a code in the ABAP query (there's a part there wherein you can have extra code) but that didn't work. Can anybody help me on this.
    Thanks a lot.
    Points will be rewarded.
    Regards,
    Question Man

  • Logical Database KDF

    Hello,
    i want to select all open items of the vendor accounts.
    I have tried this with the logical database KDF and the selection screen 900 for open items.
    Now i have the problem, that i also want the customer items of the vendor account.
    Can i get this items, too, with the logical database KDF or have i to select this separately?
    Thanks.
    Nicole

    Nicole.
    You can select customer / vendor open items directly from tables.
    BSID : Customer Open Items
    BSIK  :   Vendor Open Items
    Regards,
    Mahesh

  • Problem with logical database ADA

    I am trying to create query with asset values and master data fields but when trying to use logical database ADA I am getting error  No component exists with the name "VALUE0". .InfoSet Cannot be Used for InfoSet Query.
    Does anyone have an idea about such problem?

    Hi,
    The message "No component exists with the name "VALUE0"" created when  you omit to edit the field group only happens if no field is assigned to  a fieldgroup, it should not appear if you add at least one field to a  field group.                                        
    regards Bernhard

  • Re: Query for logical database

    Hi Experts,
    can anybody giveme any link of step-by-step how to create a query from sq03,sq02,sq01 with logical database for CIK.
    if anybody have done the query for logical databse for CIK give me ur input how to create.
    Thanks in advance,
    KK.

    Hi
    Go to SQ01 -- Enviornment --Query area - select Standard area or global as you require.
    Then go to Enviornment - Infoset - search for the existing infoset if available as per your requirement or create an infoset here.
    Write the name of Infoset and click on create . Fill all the required field like name , logical database - CIK, press enter it will populate the structure of logical database CIK, you may include /exclude here the nodes, or keep it as it is.
    And press enter.
    Now you have to create Field group and the fields inside the each group.
    You may create thefield group by clicking the create icone in the right hand side of teh screen and may drag the then fields by double clicking inside the group.
    Please mainatin sequence as per the characteristic of the table, like first select masterdata then transactuional!
    Save it. It will ask you for package, but click on local object and save it.
    Go back , it will prompt for generate infoset, say yes.
    Now your new infoset is coming among other infosets. (it is advisable to search for the existing infoset if available to avoide inconsistency in infosets).
    Now select your infoset and assign this to user groups by clicking the tab for this, you need to select user groups for this infoset here, who will be authorised to use this query.You need to take care about the user group, as this will allow you to see your infoset at the time of query generation / display.
    Save it and go back and again go back.Cross check that you are in standard query area (as selected in first step)
    Now give the query name and click on create. It will show you your infoset , select that.
    It will propmt you the next screen for name , no.of columns required, output formats etc.
    Fill as required and go to basic list now you will have screen as SQVI and have to select your selection field and output filed. After selecting the required fileds save it and execute this .
    Cheers
    Mukta
    Edited by: MUKTAKUMARI on Aug 3, 2009 11:45 AM

  • Duplicate processing by DBAdapter when using Distributed Polling with Logical Delete Strategy

    We have DBAdapter based polling services in OSB running across two Active-Active clusters (total 20 managed service across 2 clusters),
    listening to the same database table. (Both clusters read from the same source DB). We want to ensure distributed polling without duplication,
    hence in the DBAdapter we have selected Distributed Polling option, meaning we are using "Select For Update Skip Locking".
    But we see that sometimes, same rows are processed by two different nodes and transactions are processed twice.
    How do we ensure that only one managed server processes a particular row using select for update? We do not want to use the markReservedValue option which was preferred in older version of DBAdapter.
    We are using following values in DB Adapter configuration, the Jdev project for DBAdapter and the OSB proxy using DBAdapter are attached.
    LogicalDeletePolling Strategy
    MarkReadValue = Processed
    MarkUnreadValue = Initiate
    MarkReservedValue = <empty as we are using Skip Locking>
    PollingFrequency = 1 second
    maxRaiseSize = 1
    MaxTransactionSize = 10
    DistributionPolling = checked   (adds lock-n-wait in properties file and changes the SQL to SELECT FOR UPDATE SKIP LOCKED)
    Thanks and Regards

    Hi All,
    Actually I'm also facing the same problem.
    Step I follwed:
    1) Created a job_table in database
    create talbe job_table(id, job_name, job_desc, job_status)
    2)created a bpel process to test the Inbound distributed polling.
    3)Configure the DBAdapter for polling.
    a)update a field in the job_table with logical delete.
    b)select the field name form the drop down
    c) change the read value-->Inprogress and unRead value--->Ready
    d) dont change the value for Reserved value
    e) select the check box for "distributed polling".
    f) the query will be appended with "For update NoWait."
    g)click next and then finish.
    4) Then i followed the below steps.
    To enable pessimistic locking, run through the wizard once to create an inbound polling query. In the Applications Navigator window, expand Application Sources, then TopLink, and click TopLink Mappings. In the Structure window, click the table name. In Diagram View, click the following tabs: TopLink Mappings, Queries, Named Queries, Options; then the Advanced… button, and then Pessimistic Locking and Acquire Locks. You see the message, "Set Refresh Identity Map Results?" If a query uses pessimistic locking, it must refresh the identity map results. Click OK when you see the message, "Would you like us to set Refresh Identity Map Results and Refresh Remote Identity Map Results to true?Ó Run the wizard again to regenerate everything. In the new toplink_mappings.xml file, you see something like this for the query: <lock-mode>1</lock-mode>.
    5) lock-mose is not changed to 1 in toplink_mappingss.xml
    Can we edit the toplink_mappings.xml manually.
    If yes, what allt he values Ineed to change in toplink_mappings.xml file, so that it will not pick the same record for the multiple times in clustered environment.
    Please help me out this is urgent.
    Thanking you in advance.

  • DBAdapter polling with logical delete x distrib polling x DB rows per trans

    Hi all.
    I'm trying to configure a DBAdapter with "logical delete" polling strategy, distributed polling (cluster environment) and a defined number of "Database Rows per Transaction".
    When I check the box "Distributed Polling", the SQL generated gets appended by "FOR UPDATE NOWAIT"
    However, when I set a value for "Database Rows per Transaction" the "FOR UPDATE NOWAIT" sql clause disappear.
    Is this a bug, or some limitation related to the "logical delete" strategy???
    Thanks
    Denis

    Hi All,
    Actually I'm also facing the same problem.
    Step I follwed:
    1) Created a job_table in database
    create talbe job_table(id, job_name, job_desc, job_status)
    2)created a bpel process to test the Inbound distributed polling.
    3)Configure the DBAdapter for polling.
    a)update a field in the job_table with logical delete.
    b)select the field name form the drop down
    c) change the read value-->Inprogress and unRead value--->Ready
    d) dont change the value for Reserved value
    e) select the check box for "distributed polling".
    f) the query will be appended with "For update NoWait."
    g)click next and then finish.
    4) Then i followed the below steps.
    To enable pessimistic locking, run through the wizard once to create an inbound polling query. In the Applications Navigator window, expand Application Sources, then TopLink, and click TopLink Mappings. In the Structure window, click the table name. In Diagram View, click the following tabs: TopLink Mappings, Queries, Named Queries, Options; then the Advanced… button, and then Pessimistic Locking and Acquire Locks. You see the message, "Set Refresh Identity Map Results?" If a query uses pessimistic locking, it must refresh the identity map results. Click OK when you see the message, "Would you like us to set Refresh Identity Map Results and Refresh Remote Identity Map Results to true?Ó Run the wizard again to regenerate everything. In the new toplink_mappings.xml file, you see something like this for the query: <lock-mode>1</lock-mode>.
    5) lock-mose is not changed to 1 in toplink_mappingss.xml
    Can we edit the toplink_mappings.xml manually.
    If yes, what allt he values Ineed to change in toplink_mappings.xml file, so that it will not pick the same record for the multiple times in clustered environment.
    Please help me out this is urgent.
    Thanking you in advance.

  • Input query with dynamic actual & forecast values by month per year

    Hello,
    I am working on a Input ready query for a forecasting application which shows both actuals and forecast numbers and the user will revise the forecast numbers by month
    Requirement: I want to build a Input query for monthly forecasting for the current year. It will be dynamic rolling of months with actuals & forecast data.
    E.g. My report has 12 months for the current year
    and if run the report in May, the months before May has to show the actuals and the months after May has to show the old forecast data so that the user will revise the numbers again in each month and save the data to the real time cube.
    Jan.Feb.Mar.Apr.May.Jun.Jul.Aug.Sept.Nov.Dec
    Act Act  Act Act Act  Old frcst for the remaining months
      user will revise forecast for these months
    So, i am able to create Input query with all restricted key figures( plan kf has change mode set to change, actual kf are not set change) and calculate key figures and all the logic is done on dynamically moving/rolling the data based on the input month of the year.
    But the problem is that i am using cal kf to dynamically roll months, i was not able to set the change option for the cal kf.
    So, how can i make sure that the dynamically changed plan months will open for entering forecast and the actuals months not to change?
    Do you guys have any better solutions in implementing it?
    I really appreciate it your input....:)
    Thanks,
    Srini

    Hi,
    Please look at the following DOC which may be useful to you and if so please grant me point.
    Regards,
    SUbha'
    Input-Ready Query
    Use
    You use input-ready queries to create applications for manual planning. These can range from simple data entry scenarios to complex planning applications.
    Integration
    You define a query that you want to use for manual planning in the BEx Query Designer (see Defining New Queries).
    In the Web Application Designer or the BEx Analyzer, you can combine the input-ready queries with other queries and planning functions to create complex planning applications.
    Prerequisites
    You can define an input-ready query on any of the following InfoProviders:
    &#9679;     Aggregation levels (see Aggregation Levels)
    &#9679;     MultiProviders that include at least one simple aggregation level
    The aggregation levels are created in the planning modeler; MultiProviders are defined in the modeling functional area of the Data Warehousing Workbench.
    Features
    Definition of an Input-Ready Query
    Once you have defined a query on an InfoProvider, you see the Planning tab page under the Properties of structural components (for example, in key figures or restricted key figures). The options provided there allow you to determine which structural components of an input-ready query are to be input ready at runtime and which are not. With structural components that are not input ready, you can also determine whether these components are viewed as reference data or are just protected against manual entry.
    For the structural components, you also have the following options:
    Input readiness of structural components of a query
    Option
    Description
    Not input ready (reference data)
    If they are being used as reference data, the structural components are not protected by data locks to ensure exclusive access for one user because this data serves as a reference for many users.
    This is the default setting.
    Not input ready (no reference data)
    If you want to protect structural components against manual entries but allow changes by planning functions, you can use locks to protect this data for one particular user. In this way you can ensure that the planning function works with the displayed data only and not with data that has been changed by other users.
    Input ready
    You can also determine whether an input ready query is to be started in change mode or in display mode. You find this property in the Query Properties on the Planning tab page. If there is at least one input-ready query component, the query (as long as it has not been determined otherwise) is started in display mode.
    In BI applications that use input ready queries as data providers, you can enter data manually at runtime. For more information, see Performing Manual Planning and Creation of Planning Applications.
    Example
    You want to create an input-ready query for manual planning for a plan-actual comparison of revenues for a set of products. You want the plan data in a real-time-enabled InfoCube and the actual data in a standard InfoCube.
           1.      Create a MultiProvider that includes the InfoCubes for the plan and actual data.
           2.      Define an aggregation level on the MultiProvider which contains the characteristic Product and the key figure Revenue.
           3.      On the aggregation level, create two restricted key figures Plan Revenue and Actual Revenue. For restriction, choose the characteristic 0INFOPROV and restrict it to the plan or actual InfoCube.
           4.      Add the restricted key figures to the key figure structure. Insert Product into the rows. For Plan Revenue, choose Input Ready for the input-readiness option. For Actual Revenue, choose the option Not Input Ready (Reference Data).
           5.      In the query properties, set the indicator that determines whether the queries are started in display or change mode as required.
    Example of an input-ready query
    Product
    Plan Revenue
    Actual Revenue
    P01
    20
    P02
    30
    If you want to keep actual and plan data in a real-time enabled InfoCube, you do not require a MultiProvider for the task described above. Create an aggregation level on the InfoCube and define the input-ready query for the aggregation level. In the example above, a version characteristic acts as the InfoProvider. Create restricted key figures with the plan or actual version and proceed as in the previous example.

  • Dynamic select query with dynamic where condition

    Hi all,
    I want to use the dynamic select query with dynamic where condition. For that I used the below code but I am getting dump when using this code.
    Please advice, if there is any other way to achieve this requirement.
    Thanks,
    Sanket Sethi
    Code***************
    PARAMETERS: p_tabnam      TYPE tabname,
                p_selfl1      TYPE edpline,
                p_value       TYPE edpline,
                p_where1      TYPE edpline .
    DATA: lt_where    TYPE TABLE OF edpline,
          lt_sel_list TYPE TABLE OF edpline,
          l_wa_name   TYPE string,
          ls_where    TYPE edpline,
          l_having    TYPE string,
          dref        TYPE REF TO data,
          itab_type   TYPE REF TO cl_abap_tabledescr,
          struct_type TYPE REF TO cl_abap_structdescr,
          elem_type   TYPE REF TO cl_abap_elemdescr,
          comp_tab    TYPE cl_abap_structdescr=>component_table,
          comp_fld    TYPE cl_abap_structdescr=>component.
    TYPES: f_count TYPE i.
    FIELD-SYMBOLS : <lt_outtab> TYPE ANY TABLE,
    *                <ls_outtab> TYPE ANY,
                    <l_fld> TYPE ANY.
    struct_type ?= cl_abap_typedescr=>describe_by_name( p_tabnam ).
    elem_type   ?= cl_abap_elemdescr=>describe_by_name( 'F_COUNT' ).
    comp_tab = struct_type->get_components( ).
    comp_fld-name = 'F_COUNT'.
    comp_fld-type = elem_type.
    APPEND comp_fld TO comp_tab.
    struct_type = cl_abap_structdescr=>create( comp_tab ).
    itab_type   = cl_abap_tabledescr=>create( struct_type ).
    l_wa_name = 'l_WA'.
    CREATE DATA dref TYPE HANDLE itab_type.
    ASSIGN dref->* TO <lt_outtab>.
    *CREATE DATA dref TYPE HANDLE struct_type.
    *ASSIGN dref->* TO <ls_outtab>.
    * Creation of the selection fields
    APPEND p_selfl1 TO lt_sel_list.
    APPEND 'COUNT(*) AS F_COUNT' TO lt_sel_list.
    ** Creation of the "where" clause
    *CONCATENATE p_selfl1 '= '' p_value ''.'
    *            INTO ls_where
    *            SEPARATED BY space.
    *APPEND ls_where TO lt_where.
    * Creation of the "where" clause
    APPEND p_where1 TO lt_where.
    * Creation of the "having" clause
    l_having = 'count(*) >= 1'.
    * THE dynamic select
    SELECT          (lt_sel_list)
           FROM     (p_tabnam)
           INTO CORRESPONDING FIELDS OF TABLE <lt_outtab>.
    *       WHERE    (lt_where).

    Hi Sanket,
    The above given logic of mine works for you, put the code in the If condition and try-
    just like below:
    IF NOT P_EBELN IS INITIAL.
    lt_where = '& = ''&'' '.
    REPLACE '&' WITH p_ebeln INTO lt_where.
    REPLACE '&' WITH field_value INTO lt_where.
    SELECT (lt_sel_list) INTO CORRESPONDING FIELDS OF TABLE <lt_outtab>
    FROM (p_tabnam)
    WHERE (lt_where).
    ENDIF.
    thanks\
    Mahesh

  • Execution time of query with high variance

    I have an Oracle Database 11.2 R2 which is set up just for testing purposes, so there is no other activity except mine. Now I have a query which I ran 10 times in a row. Between the executions I always flushed BUFFER_CACHE and SHARED_POOL. The strange thing is, that the execution time of the query is strongly varying from 13 seconds up to 207 seconds. From the 10 executions I have 4 times <25 seconds and 4 times > 120 seconds.
    What could be the reason for this? As I've said, there is no other activity on the database and it is always the same query with the same parameters running on the same set of data.
    The background to this is that I would like to compare the execution time of exactly the same query with different database settings. So I thought I could just run the query ten times and use the average but I didn't expect such a high variance.
    Kind regards
    Peter

    Hi,
    for each execution, look at:
    1) plan hash value
    2) total logical I/O
    3) physical I/O
    That should give you some clues as to what's going on.
    Best regards,
    Nikolay

Maybe you are looking for