What are the differences between this two statements???

1.select * from counter where eboxid = (select acctid from zsyy_ocecs.cm_subs_subscriber where servnumber = ?);
2.select b.* from zsyy_ocecs.CM_SUBS_SUBSCRIBER a,COUNTER b where a.acctid = b.eboxid and a.servnumber = ?;
what are the differences between the 2 sql statements??
I WILL APPRECIATE FOR YOUR ANSWERS VERY MUCH, BECAUSE I WAS PUZZLED WHEN I SAW THE EXECUTION PLANS.THANKS AGAIN. MR SHI.
the followings are their execute plans:
Command> select * from counter where eboxid = (select acctid from zsyy_ocecs.cm_subs_subscriber where servnumber = ?);
Query Optimizer Plan:
STEP: 1
LEVEL: 2
OPERATION: TblLkTtreeScan
TBLNAME: ZSYY_OCECS.CM_SUBS_SUBSCRIBER
IXNAME: IDX_SERVNUM
INDEXED CONDITION: CM_SUBS_SUBSCRIBER.SERVNUMBER = qmark_1
NOT INDEXED: ROWNUM < 3
STEP: 2
LEVEL: 2
OPERATION: RowLkTtreeScan
TBLNAME: COUNTER
IXNAME: IDX_COUNTER
INDEXED CONDITION:
COUNTER.EBOXID = CM_SUBS_SUBSCRIBER.ACCTID
NOT INDEXED: <NULL>
STEP: 3
LEVEL: 1
OPERATION: NestedLoop
TBLNAME: <NULL>
IXNAME: <NULL>
INDEXED CONDITION: <NULL>
NOT INDEXED: <NULL>
Command> select b.* from zsyy_ocecs.CM_SUBS_SUBSCRIBER a,COUNTER b where a.acctid = b.eboxid and a.servnumber = ?;
Query Optimizer Plan:
STEP: 1
LEVEL: 2
OPERATION: TmpTtreeScan
TBLNAME: ZSYY_OCECS.CM_SUBS_SUBSCRIBER
IXNAME: <NULL>
INDEXED CONDITION: <NULL>
NOT INDEXED: A.SERVNUMBER = qmark_1
STEP: 2
LEVEL: 2
OPERATION: TblLkTtreeScan
TBLNAME: COUNTER
IXNAME: IDX_COUNTER
INDEXED CONDITION: B.EBOXID
= A.ACCTIDNOT INDEXED: <NULL>
STEP: 3
LEVEL: 1
OPERATION: MergeJoin
TBLNAME: <NULL>
IXNAME: <NULL>
INDEXED CONDITION: A.ACCTID = B.EBOXID
NOT INDEXED: <NULL>
Edited by: user9533799 on 2008-9-3 上午1:28

If zsyy_ocecs.cm_subs_subscriber table returns one row for each servnumber, both statements would return the same data. But if there was a servnumber value on two rows, the first statement will throw an error (you a comparing a value with a set of values). You can rewrite the first query to avoid this:
select * from counter where eboxid in (select acctid from zsyy_ocecs.cm_subs_subscriber where servnumber = ?);
Conceptually they are different and the execution plan can't be the same.

Similar Messages

  • What's the difference between "PreparedStatement" and "Statement"?

    What's the difference between "PreparedStatement" and "Statement"?
    Which is better??????

    Read the docs for the two classes. The differences are apparent there.
    Which one is better depends on your needs. I think that constructing and executing a PreparedStatement can be a bit less performant than just a Statement, if you're only executing the query one time. But I don't think that difference will normally be noticable in the context of a given application.
    Additionally, if you have to pass any dates or strings to the query, you'll want PreparedStatement's parameters, rather than trying to format and escape things in the query string.

  • What are the differences between inactive and active ABAP objects?

    Can anybody tell me what are the differences between inactive and active ABAP objects?
    In my opinion,  an active object is compiled and system wide available, that means the system do not have to compile the program again before run or use the object. While An inactive object is not system wide available and every time you run an inactive object, firstly the abap runtime will have to  generate a tempory runtime object and this inactive object can not seen by others.
    Am I right? Can anybody kindly tell me other differences?

    Hi,
    "When it is inactive, it is like it would not exist at all:" no - it's like it only exists to you
    "If we just saved that one means it is stored in application server not in database": no - the inactive version is also stored in the database. You can log off and log on and it will still be there, in its inactive status.
    "Only active objects can be executed.": no - inactive objects can be executed by you
    When you create or modify a program, it is inactive until you activate it.
    With a change, there are two versions of the program stored in the database - the active version (as it was before you made your change), and the inactive version. If you attempt to run the program, you'll run the inactive version - the one with your changes. Everyone else on the system will run the active version.
    In this way, you can make changes without affecting anyone else.
    Once you activate your program, then the inactive version becomes the active version.
    With a create, there is no active version, until you hit the activate button. This means ONLY you can run the program.
    An additional benefit of this model, is that if you make a change, save it, and then change your mind without activating, you can recover the active version into the editor, using version management.
    A downside is that sometimes you have to activate your change before you can test it, if it interacts with other, active, programs.
    Regards,
    Kumar

  • What is the difference between these two portalapps folders on the Server?

    Hello,
    On the Server there are two portalapps folder:
    1. Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\portalapps
    2. Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps
    Can someone please explain me what is the difference between these two portalapps folders and under which case will I turn to which folder?

    Hi Roy,
    The one at this location
    Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\portalapps
    has all the files from the WEB-INF folder i.e. these are the non-web resources and cannot be accessed via HTTP(S) examples would be imgaes, CSS etc that you want only your application to access
    those under
    Under: C:\usr\sap\JXX\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps
    they have all the .JAR files, portalapp.xml, config properties etc. these are web resources and can be accessed via HTTP(S)
    Hope this is of help.
    Akhilesh

  • What are the differences between ECC5.0 and 6.0 new GL functionality

    Hi Experts,
    What are the differences between ECC5.0 and 6.0 new GL functionality.
    If we want to implement IFRS, I think New GL functionality is very helpful, but why sap is recommending only for ECC6.0 new GL functionality, Eventhough this functionality is available in ECC5.0.
    Best Regards,
    Dharani

    Dear,
    ECC 5.0 vs. ECC 6.0/SAP ERP 6.0
    Functionality not available in the new G/L with mySAP ERP 2004 and ERP Central Component (ECC) 5.0:
    Transfer prices
    Statistical key figures
    Euro translation
    Audit Information System (AIS)
    Archiving
    Data retention tool
    Regards,
    Chintan Joshi.

  • What is the difference between these two reports MC.1 and MB5L

    Hi
    what is the difference between these two reports MC.1 and MB5L?
    what is the Purpose of each report?
    Material ledger is activated for this plant, we found some amount difference between these two reports, my client accounting department used to compare these two reports while year end/month end closing
    Thanks
    Raju

    MC.1 will give you the report for plant analysis as per plant .
    MB5L report will give you list of stock value as per G/L account wise.

  • What are the differences between ESB 10g and OSB 10g

    Hi,
    I'm newbie to OSB 10g. I have installed OSB 10g.
    I came to know after Oracle acquired BEA, the ALSB is renamed as OSB.
    I'm curious to know what are the differences between ESB and OSB.
    If there are many differences, please post any links which provide the required information in detail.
    Thanks in advance.
    Regards,
    Udaya

    the 'old' esb has been renamed to mediator and is now only used as component in your sca application.
    the two service buses can't really be compared since the osb (former alsb) has way more functionality in it.
    Oracle gave it it's own place in his soa portfolio and the old esb can only be used als mediator in your sca application.
    On top of your sca application you could use the OSB to complete your architecture design.
    the difference between both.
    esb (now used as mediator) can only be used in your sca application
    in here you will use it mostly for routing/transformation, and there is some functionality for assign/java callouts conditional routing
    the osb is complete product with a lot of functionality in it. Everything you used the old 'esb' for can be done in the OSB and with a lot of extra's.
    routing/transformation/service call outs/java callouts/transport virtualization/security/and more and more
    you should read the guides of the OSB to get an idea of everything it can do for you.
    http://www.oracle.com/technetwork/middleware/service-bus/overview/index.html

  • What are the differences between trigger and constraints?

    what are the differences between trigger and constraints?

    Try the documentation, this would be a good starting point: How Oracle Enforces Data Integrity
    C.

  • What are the differences between the Time Capsule MC344LL/A and MD032LL/A, do both havethe same make of server grade HDD, also any changes in WiFi coverage and networking abilities?

    What are the differences between the Time Capsule MC344LL/A and MD032LL/A, do both have the same make of server grade hard drive, also any changes in WiFi coverage or networking abilities?  Thanks

    Found this info regarding original question:
    What are the differences between the Time Capsule MC344LL/A and MD032LL/A, do both have the same make of server grade hard drive, also any changes in WiFi coverage or networking abilities?  Thanks
    http://www.hardmac.com/articles/402/page1
    http://www.applefritter.com/node/23907
    Hope this helps -
    ; >}

  • What are the differences between the following Oracle database views?

    What are the differences between the following Oracle database views(or function)? Can they be instead of each other? Can all of them be used to pull out the execution plan from the library cache?
    V$SQL_PLAN
    DBA_HIST_SQL_PLAN
    dbms_xplan.display_cursor function

    junez wrote:
    What are the differences between the following Oracle database views(or function)? Can they be instead of each other? Can all of them be used to pull out the execution plan from the library cache?
    V$SQL_PLAN
    DBA_HIST_SQL_PLAN
    dbms_xplan.display_cursor functionV$SQL_PLAN-this is dynamic perfomance view which contain execution plan information for each child cursor loaded in the library cache.
    DBA_HIST_SQL_PLAN- data dictionary view also contain execution plan information for each child cursor bun in workload repository.Actually this view captures information from V$SQL_PLAN and is used with the DBA_HIST_SQLSTAT .
    dbms_xplan.display_cursor - function displays explain plan of any cursor loaded in the cursor cache. See more information below links:
    http://youngcow.net/doc/oracle10g/server.102/b14237/dynviews_2120.htm
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/statviews_2154.htm
    http://download.oracle.com/docs/cd/B12037_01/appdev.101/b10802/d_xplan.htm#998179

  • What are the differences between SunFire 880 and v880?

    What are the differences between SunFire 880 and SunFire V880?
    Did a search for "SunFire 880" and found links to the V880 but nothing for the one without the V:
    http://www.sun.com/servers/midrange/v880/

    There are four machines in the server room, two rather old and not in service right now, the other two are relatively new and are now in service.
    The print on one new and one old machine is "*SunFire 880*" and
    the print on the other two (one new and one old) is "*SunFire V880*".
    No, it's not that the paint is chipped or any such thing and there is no space for a "*V*" in the print.
    btw, of the two that are in service, both have the same OBP version, if it matters.
    Hence it appears that Sun indeed sold machines with V and without V.
    So, what are the differences?
    Edited by: ad101 on Aug 25, 2009 5:14 PM

  • What are the differences between iphoto ios5 and iphoto ios6?

    what are the differences between iphoto ios5 and iphoto ios6?

    There is no difference unless you update iPhoto.
    The iPhoto.app was updated and now version 1.1 is available. This version includes the ability to create Shared Photo Streams if you have iOS 6.
    -Doug

  • What are the differences between TestStand Version 1.0.2 and 1.0.3?

    I have TestStand version 1.0.2 and have a customer that uses 1.0.3. I am updating test software for that customer and need to know if I can use TestStand 1.0.2. What are the differences between 1.0.2 and 1.0.3?

    vc -
    The Whatsnew.txt file for TestStand 1.0.3 contains the following text:
    Changes from TestStand 1.0.2 to 1.0.3
    TestStand 1.0.3 includes a translation to Japanese. It also
    includes other fixes mostly related to translation issues.
    1) Configure Database Options menu item was not localized.
    2) Dismissing a modal CVI dialog brought a random window to the front.
    3) Removed text from operator interface splash screens
    4) Resized operator interface panels
    5) In the TestStand - Sequence Display.vi of the LabVIEW operator interface, the
    following control descriptions didn't use resource strings:
    - Sequence Description:
    - Current Test:
    - Number of Tests:
    6) The Engine Installation Wizard wasn't localizable.
    7) Flexible MessageBox sometimes displayed only 1-2 lines. This was seen in the
    Edit Database Options Help dialog and the Adapter Configuration dialog in the
    CVI operator interface.
    8) The buttons in the Automation Adapter Configuration dialog were not localized.
    9) Font for the Add Directory to Search Directories checkbox on Find File dialog
    was incorrect for Japanese Windows.
    10) Dialog used to browse for directory to specify the report location was not translated.
    11) Database Viewer was not localized correctly.
    Scott Richardson
    National Instruments

  • What are the differences between Turn in Final Timesheet and the other option: Send Progress for Selected Tasks?

    Hello,
    The resource filled his/her timesheet in PWA. 
    Now : 
    What are the differences between Turn in Final Timesheet
    and the other option: Send Progress for Selected Tasks?
    Thanks

    You are partially correct and partially wrong.
    Turn
    in Final Timesheet sends
    the timesheet to the Timesheet Manager for Approval
    but task update always goes to Status manger of the task. Taks manager you can see in MPP(insert status manager field then check)
    Yes
    after approval progress will be available in MPP as well as in Projectweb app as % complete . 
    Send
    Progress for Selected Tasks 
    Send progress of selected task to status manager after approval update will be available in both MPP and Projectweb
    app as % complete.
    In Send
    Progress for Selected Tasks Timesheet
    Manager doesn't receive anything in his Approval center
    because all the update directly go to Status manager Approval center.
    Here you have to understand
    that there are two role Timesheet Manager(for timesheet approval) and Status manager(for task
    actual approval) 
    kirtesh

  • What are the differences between api and sdk

    Hi,
    Could anybody clarify for me what are the difference between API and SDK? I googled for the answer, and couldn't find any thing on this topic.
    Many thanks in advance.
    javasfan

    Is it correct to say that "a SDK includes all the
    APIs"? or "API sits on top of the SDK"?It's a bit weird to say either. First, the JDK doesn't include all APIs. Just the J2SE core API. Others, like 3rd party libraries or J2EE are not included. Second, if you mean the API docs, they're also not included IIRC.
    It'd technically only be correct to say "the SDK provides an API", I guess. The example is very lame, but: if the SDK is a machine, the API is the sum of its buttons and levers and gauges and intakes and outlets and exhausts. The API docs are the manual.

Maybe you are looking for

  • SEND SYNC IN BPM SOAP ADAPTER FOR WS

    Hi all, I´m having problems with an BPM that send a sync message to a ws using a Soap adapter. I have the following error Work item 000000087293: not possible execute CL_SWF_XI_MSG_BROKER, method SEND_SYNCHRON. I´m on SP15. Any Idea? Many thanks Noel

  • How to syncing my ipod touch to my pc

    I have all my music tracks on my pc but I have lost them on my ipod touch how can I restore them to my ipod (syncing)

  • Date stays at 09.05.11, how to change?, date stays at 09.05.11, how to change?

    whenever i make use numbers and try to enter a date, it will autocorrect so that the date is whatever month i entered.05.whatever year i entered.  When i use howler, the date for the alarm is always 09.05.11.  I know this was the release date, so it

  • Recovered purchased content after HD crash

    Hi I recently lost content purchased from the store due to a hard disk crash. I replaced disk and installed iTunes etc and signed into the store to re-download the content. When I click the Purchased link I can see everything that I've purchased, but

  • Cannot import media files from CD

    Am using v1.5 on my Dell laptop with an external CD drive. On my desktop, I can go into Audition, Multi-track view and right click on any Track and Insert Audio and click on track from my CD and it inserts into the multitrack. When I try this with my