Anomaly regarding first entry in explain and explain join

Hello there,
I have TPC-H benchmark database and I ran the following query with and without index on the column p_retailprice
select
     s_acctbal,s_name,n_name,p_partkey,p_mfgr,s_address,s_phone,s_comment
from
     dbo.part,dbo.supplier,dbo.partsupp,dbo.nation,dbo.region
where
     p_partkey = ps_partkey and p_retailprice <= 1.0
with index
first entry in Expalin is of  PART table , strategy is :range condition for index" and pagecount is 3627
first entry in explain join has table name PART and accumalated cost is 2
without index
both the explains have the value 17239 for pagecount and accumalated cost for the same entry
My question is what is the relation between first entry in both explains? The pagecount and accumalated costs(for the first entry)  for all queries when no index is applied comes to be the same but with index the value differs.

Hi again.
would you mind to show us the results of 'explain' and 'explain join'?
Be aware that in the normal 'explain'-output the "costs" that are printed in each line are not the assumed costs of that specific execution step.
Instead what you see there are the statistic information for the total object size (e.g. table or indexsize in pages).
regards,
Lars

Similar Messages

  • Difference between SQL Explain and SP Explain

    What is the difference between SQL Explain and SP Explain? And why would they suggest a different index is being used for the same statement in the same trace?

    Hi,
    Go through the link,
    http://www.redbooks.ibm.com/redbooks/pdfs/sg247094.pdf#search=%22SQL%20Explain%20and%20SP%20Explain%20in%20SAP%22
    Regards,
    Azaz.

  • Which are the standard classes for events in ALV and explain each class pls

    which are the standard classes for events in ALV and explain each class pls
    POINTS WILL BE AWARDED,
    REGARDS,
    jagrut bharatkumar Shukla

    hi,
    some links.
    www.sapgenie.com
    www.abap4u.com
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
    download the PDF from following link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    The ALV object Grid methods allow the same functionality as ALV grid report function modules but are displayed within
    a screen (dialog program). SAP has provided a suit of programs which demonstrate how to For examples see standard SAP
    programs as detailed below:
    BCALV_EDIT_01 This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
    BCALV_EDIT_02 This report illustrates how to set chosen cells of an ALV Grid Control editable.
    BCALV_EDIT_03 In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE.
    The report checks the input value(s) semantically and provides protocol messages in case of error
    BCALV_EDIT_04 This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to
    implement the saving of the new data.
    BCALV_EDIT_05 This example shows how to use checkboxes within an ALV Grid Control. You learn:
         (1) how to define a column for editable checkboxes for an attribute of your list
         (2) how to evaluate the checked checkboxes
         (3) how to switch between editable and non-editable checkboxes
    BCALV_EDIT_06 This example shows how to define a dropdown listbox for all cells of one column in an editable ALV
    Grid Control.
    BCALV_EDIT_07 This example shows how to define dropdown listboxes for particular cells of your output table.
    BCALV_EDIT_08 This report implements an ALV Grid Control with an application specific F4 help. The following aspects
    are dealt with:
         (1) how to replace the standard f4 help
         (2) how to pass the selected value to the ALV Grid Control
         (3) how to build an f4 help, whose value range depend on a value of another cell.
    Rgds
    Anversha

  • Hello to you in the company Apple. I am having a problem in the Apple Store ID does not allow me to work on the Apple Store I hope that you will help. You have sent you yesterday and today I want to call the phone number for Mei you and explain to you why

    Hello to you in the company Apple. I am having a problem in the Apple Store ID does not allow me to work on the Apple Store I hope that you will help. You have sent you yesterday and today I want to call the phone number for Mei you and explain to you why with many thanks

    Sorry, but you can't reach Apple here. This is a user to user forum and Apple does not follow these discussions.
    Try this link to contact Apple directly:
    Apple - Support - iPhone - Contact Support
    Did you already have a look at this page?
    App Store Frequently Asked Questions (FAQ)

  • Plain Explain  and s methods (tools) for  to improve Performance

    Hi
    How can I do to use Plain Explain and others methods for to impove performance ?
    Where can I to find tutorial about it ?
    thank you in advance

    Hi
    How can I do to use Plain Explain and others
    methods for to impove performance ?
    Internally there are potentially several hundred 'procedures' that can be assembled in different ways to access data. For example, when getting one row from a table, you could use an index or a full table scan.
    Explain Plan shows the [proposed] access path, or complete list of the procedures, in the order called, to do what the SQL statement is requesting.
    The objective with Explain Plan is to review the proposed access path and determine whether alternates, through the use of hints or statistics or indexes or materialized views, might be 'better'.
    You often use Wait analysis, through StatsPack, AWR/ADDM, TKProf, Trace, etc. to determine which SQL statement is likely causing a performance issue.
    >
    Where can I to find tutorial about it ?Ah ... the $64K question. If we only knew ...
    There are so many variables involved, that most tutorials are nearly useless. The common approach therefore is to read - a lot. And build up your own 'interpretation' of the reading.
    Personal suggestion is to read (in order)
    1) Oracle's Database Concepts manual (described some of 'how' this is happening)
    2) Oracle's Performance Tuning manual (describes more of 'how' as related to performance and also describes some of the approaches)
    3) Tom Kyte's latest book (has a lot of demos and 'proofs' about how specific things work)
    4) Don Burleson's Statspack book (shows how to set up and do some basic interpretation)
    5) Jonathan's book (how the optimizer works - tough reading, though)
    6_ any book by the Oak Table (http://oaktable.net)
    Beyond that is any book that contains the words 'Oracle' and 'Performance' in the title or description. BUT ... when reading, use truck-loads, not just grains, of salt.
    Verify everything. I have seen an incredible amount of mistakes ... make 'em mysellf all the time, so I tend to recognize them when I see them. Believe nothing unless you have proven it for yourself.. Even then, realize there are exceptions and boundary conditions and ibgs and patches and statistics and CPU and memory and disk speed issues that will change ehat you have proven.
    It's not hopeless. But it is a lot of work and effort. And well rewarded, if you decide to get serious.

  • What is interface?what is EDI? take one example and explain it?

    what is interface?what is EDI? take one example and explain it?

    Hi,
    Electronic Data Interchange (EDI) is a set of standards for structuring information to be electronically exchanged between and within businesses, organizations, government entities and other groups. The standards describe structures that emulate documents, for example purchase orders to automate purchasing. The term EDI is also used to refer to the implementation and operation of systems and processes for creating, transmitting, and receiving EDI documents.
    Despite being relatively unheralded, in this era of technologies such as XML services, the Internet and the World Wide Web, EDI is still the data format used by the vast majority of electronic commerce transactions in the world.
    EDI testing is to test the EDI transmissions and validate the accuracy and consistency of data mapping between the sender, translator/middleware (if any) and receiver systems.
    http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/EDI_tutorial.html
    Rewards points if is useful.

  • I am attempting to update students' iPads using the Apple Configurator software. However, information for 3rd party apps, like Notability and Explain Everything, is being lost.

    I am attempting to update students' iPads using the Apple Configurator software. However, information for 3rd party apps, like Notability and Explain Everything, is being lost.

    Mike,
    If by "still nothing" you mean they are not showing up in the AU manager after reinstalling them....
    Im guessing the AU Cache itself is now corrupted so.....
    Quit LPX
    Open Finder
    Press the option key and click "Go" in Finder's menu and select "Library". (This is the User Library and not the System Library and is normally hidden which is why you have to hold down the option key when clicking on Go.... to reveal it in the drop down menu that will appear)
    Go to "Caches" dir and remove "AudioUnitCache" dir.
    Now Restart your Mac.....
    and then Launch LPX and let it rescan your plugins and see if that fixes things....
    Fingers crossed...
    Nigel

  • Hi I bought this Friday a 10 GB storage plan, but I received an email than I need to pay it every months how I can cancel this contract Becouse I don't able to pay it every years somebody can help and explains it to me please thanks you

    Hi I bought this Friday a 10 GB storage plan, but I received an email than I need to pay it every year how I can cancel this contract Becouse I don't able to pay it every years somebody can help and explains it to me please thanks you

    From this page http://support.apple.com/kb/TS4009 :
    iOS 5
    From your home screen, tap Settings > iCloud.
    Tap your iCloud account at the top of the screen.
    Select your iCloud Storage plan.
    Tap Downgrade Options and follow the prompts.
    There are also instructions for Windows and Mac OS X on that page

  • HT3702 There was a problem amounts will be deducted from my account since January repeatedly and large amounts please explain and return amounts if taken unjustly

    There was a problem amounts will be deducted from my account since January repeatedly and large amounts please explain and return amounts if taken unjustly

    This is a User to User Forum.
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Steps And Explain How To OverClock MB:Z77a-gd65 Cpu:I7 3770k Ram:2x4(8gb) 2133

    Steps And Explain How To OverClock and tell us why we enabled and disabled option and voltage and shortcut means ex: ( EIST )
    Board     : MSI Z77A-GD65
    VGA        : gigabyte 570 soc
    V-Bios     : 10.8
    PSU         : huntkey 700w
    CPU        : Intel Core I7-3770K
    MEM       : gskill 2133 2x4gb F3-17000CL9D-8GBXM http://www.gskill.com/products.php?index=403
    HDD        : corsair force 3 SSD 60gb on(OS) 
    Cooler    : corsair H100
    OS          : Win 8 Pro 64bit
    Case      : bitfenix.Colossus
     

    Quote
    Spread Spectrum ---Disable--- why
    Spread Spectrum is for unique situation where there are TONS of computers in close proximity and is used to prevent them from interfering with each other via emf. It is also less stable.
    Quote
    Q2 :Intel Turbo Boost ---enbled--- why
    This would be enabled when using a turbo oc. It boosts the cpu multiplier when under load.
    Quote
    Q3 :Enhanced Turbo------ enbled----why
    Enhances turbo operation by increasing the multiplier on all of the cores to the same amount.
    Quote
    Q4 :intrnal pll overvoltage -----enbled---- why
    You can leave this on "auto" for most everyday overclocks. It increase voltage to the PLL a tab but can cause issues with sleep if you are using an everyday OC.

  • Get first entry of a table (return parameter of procedure)

    Hello Community,
    I created a procedure with a couple of projections and one join.
    The procedure returns the result as a parameter (o_result).
    In the calling procedure, I get the result.
    But I need to do further processing based on the first row of the result.
    Is this possible with SAP Hana SQL Script?
    Many thanks in advance.
    Regards, Rolf

    Hi Rolf,
    Your question is not very clear. May be you explain what you want to achieve after getting first entry of table.
    In your calling procedure you would make a call and bind the output table like this
    call proc1 ( :input_param, output_tab);
    On the returing output_tab you could just write something like
    output_top1 = select top 1 * from :output_tab;
    You could use this table for whatever processing you want to do further.
    If you want to get values into some scalar variables that is also possible.
    e.g
    declare lv_column1 nvarchar(10);
    select column1 into lv_column1 from :output_top1;
    Thanks
    Sagar

  • DIFFERENCE BETWEEN "AT NEW " AND "AT FIRST" , "AT END OF" AND "AT LAST" ?

    WHAT IS THE DIFFERENCE BETWEEN "AT NEW " AND "AT FIRST" , "AT END OF" AND "AT LAST" WITH REFERENCE TO CONTROL BREAK STATEMENTS ? PLEASE EXPLAIN IN DETAIL.
    BEST REGARDS
    RYAN.

    Hi
    i am sending you a simple program in which i had write program on that events
    you can understand very easily
    Using AT FIRST , AT NEW, AT THE END OF , AT LAST.
    DATA: BEGIN OF ITAB OCCURS 0,
          F1 TYPE I,
          F2(6) TYPE C,
          F3(10) TYPE N,
          F4(16) TYPE P DECIMALS  2,
          END OF ITAB.
    DATA: SUB_TOT(10) TYPE P DECIMALS 3.
    **--1
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 30.
    ITAB-F4 = '3000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *--2
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *-- 3
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    SORT ITAB BY F1.
    LOOP AT ITAB.
    AT FIRST.
    WRITE: /35 ' MATERIAL DETAILS:'.
    ULINE.
    ENDAT.
    AT NEW F1.
    WRITE: / 'DETAILS OF MATERIAL:' COLOR 7  , ITAB-F1.
    ULINE.
    ENDAT.
    WRITE: / ITAB-F1, ITAB-F2, ITAB-F3, ITAB-F4.
    SUB_TOT = SUB_TOT + ITAB-F4.
    AT END OF F1.
    ULINE.
    WRITE: / 'SUB TOTAL :'  COLOR 3 INVERSE ON, SUB_TOT COLOR 3 INVERSE ON.
    CLEAR SUB_TOT.
    ENDAT.
    AT LAST.
    SUM.
    ULINE.
    WRITE: 'SUM:', ITAB-F4.
    ULINE.
    ENDAT.
    ENDLOOP.
    Using AT FIRST , AT NEW, AT THE END OF , AT LAST.
    DATA: BEGIN OF ITAB OCCURS 0,
          F1 TYPE I,
          F2(6) TYPE C,
          F3(10) TYPE N,
          F4(16) TYPE P DECIMALS  2,
          END OF ITAB.
    DATA: SUB_TOT(10) TYPE P DECIMALS 3.
    **--1
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 1.
    ITAB-F2 = 'ONE'.
    ITAB-F3 = 30.
    ITAB-F4 = '3000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *--2
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 2.
    ITAB-F2 = 'TWO'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    *-- 3
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 10.
    ITAB-F4 = '1000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    ITAB-F1 = 3.
    ITAB-F2 = 'THREE'.
    ITAB-F3 = 20.
    ITAB-F4 = '2000.00'.
    APPEND ITAB.
    CLEAR ITAB.
    SORT ITAB BY F1.
    LOOP AT ITAB.
    AT FIRST.
    WRITE: /35 ' MATERIAL DETAILS:'.
    ULINE.
    ENDAT.
    AT NEW F1.
    WRITE: / 'DETAILS OF MATERIAL:' COLOR 7  , ITAB-F1.
    ULINE.
    ENDAT.
    WRITE: / ITAB-F1, ITAB-F2, ITAB-F3, ITAB-F4.
    SUB_TOT = SUB_TOT + ITAB-F4.
    AT END OF F1.
    ULINE.
    WRITE: / 'SUB TOTAL :'  COLOR 3 INVERSE ON, SUB_TOT COLOR 3 INVERSE ON.
    CLEAR SUB_TOT.
    ENDAT.
    AT LAST.
    SUM.
    ULINE.
    WRITE: 'SUM:', ITAB-F4.
    ULINE.
    ENDAT.
    ENDLOOP.
    <b>Reward if usefull</b>

  • How to make only first entry in table noneditable

    Hi,
    Only the first entry in the table should be made noneditable and remaining editable.
    Thanks and Regards,
    Sridevi

    Hi Sridevi,
    make it first your table will non editable all the rows.
    then use small button, write some code inside that to edit from the second row onwards.
    sample code:
      IF lo_el_professional_data IS INITIAL.
        CALL METHOD lo_nd_professional_data->create_element
          RECEIVING
            element = lo_el_professional_data.
      ENDIF.
      l_count = lo_nd_professional_data->get_element_count( ).
      l_index = lo_nd_professional_data->get_lead_selection_index( ).
      l_index = l_index + 1.
      lo_el_professional_data = lo_nd_professional_data->create_element( ).
      CALL METHOD lo_nd_professional_data->bind_element
       EXPORTING
          new_item             = lo_el_professional_data
          set_initial_elements = abap_false
          index                = l_index
    Regards,
    Naresh.

  • Best practises regarding generation of the EOImpl and VORowImpl java files

    Greetings,
    I was wondering what is the best practice/suggested approach regarding generation of the EOImpl and the VORowImpl java files for ADF Business Components.
    From the maintenance point of view, it makes sense to generate them only if you want to put some custom code in those e.g. validation or transient attribute.
    However from performance point of view, does it help to have these EOImpl and the VORowImpl java files generated.
    Any thoughts on this will be a lot helpful.
    regards - rutwik

    Hi
    Sections:
    * 5.11.3.3 Attribute Indexes and InvokeAccessor Generated Code
    * 6.9.4.4 Attribute Indexes and InvokeAccessor Generated Code
    Explain the details of the generated code for view object row classes and entity object row classes, respectively.
    As described in the guide, the key benefit of the generated code is not performance, but of type-safe access and having a place to put custom code when needed.
    When you don't have a generated row class, then there is no typesafe method like getSal() to get the Sal attribute.
    Section 4.4.9 Generic Versus Strongly-Typed APIs gives a few more details on that and both 5.11.1.1 Generating Bind Variable Accessors and 5.11.1.2 Generating View Row Attribute Accessors give some concrete examples of the value proposition of the strongly-typed API's.
    Without the typed API's of course, you need to get an attribute value by calling:
    yourRow.getAttribute("SomeAttrName");
    or
    yourRow.getAttribute(3); // integer attribute index (zero-based) [see section 5.11.3.3 in the guide]
    Since it's rare that someone will like to use the numerical approach, then let's assume that people would go with the generic getAttribute("SomeAttrName") way.
    Internally, the framework will need to find the attribute index based on the attribute name before accessing the attribute. If you perform this attribute-name-to-attribute-index lookup a zillion times, then of course it would end up representing some overhead that you could avoid by either using the numerical index yourself, or generating the strongly-typed class. The generated code avoids the need to lookup the attribute by string name and also provides the compile-time checking (i.e. typesafe access) in your code.
    So, the performance of using the attribute index access (or the generated code) that is ever-so-slightly faster than using the attribute access by string name, not necessarily the generation of code itself that makes things faster. The performance shouldn't be the basis of the strategy decision, but if they see the value of typesafe access then it might be worth the extra files -- some perhaps containing no custom code -- being generated for them.
    Hope this helps
    rgds
    susan

  • G/L Account mentioned on line level does not get hit in Journal entry on GRPO and AP Invoice in SAP B1 9.0 PL - 11

    Hi,
    G/L Account mentioned on line level does not get hit in Journal entry on GRPO and AP Invoice in SAP B1 9.0 PL - 11
    I am creating an independent AP Invoice, there are two issues:
    1. On line level G/L Account field is not open for selection
    2. I have then selected and updated the account on Form Settings. Same account gets updated on line level.
         In Journal Entry selected G/L account on line level shall be hitted. But it does not put any effect on JE. Accounting is set by Warehouse. It picks up accounts from warehouse only.
    Need help its urgent.
    Thanks in advance.

    Invoice is Item Type.
    G/L Accounts are set by Warehouse. But if explicitly we are want to change the account on line level in that case, it is not getting reflected in Journal entry. On AR Invoice same scenario works perfectly. On line level I can change the accounts explicitly and have the effect on Journal entries.
    Issue seems to be on AP side only.
    As required please find attached the screen shots.
    JEwith mapped GL Account on Warehouse
    JEwith different GL Account on line Level via Form Settings
    Thanks & Regards
    Sonil

Maybe you are looking for