What is better to use and why?

Hi,
What is better to use and why?
We have written follwing statements to check the existence of interested record in table.
1).
select count(*) from emp where deptno = 20;
2).
select 'X'
from dual
where exists (
select 'X' from emp
where deptno = 20);
Thanks and Regards,
Rushang Kansara

Assuming a large table, number two would be the fastest. If empno in unique, you can leave out the where exists part and just select x from emp where empno = 20. If empno is not unique, then using where exists can be faster. Assuming that empno is not unique, query 1 may elect to scan the whole table looking for that empno. Number 2 can use the index and return your result in, typically, three LIOs.
Again, it all depends on your indexing, size of tables, and uniqueness of key upon which you are searching.

Similar Messages

  • Bootcamp or Paralles - what do you use and why?

    What program do you use and why?

    I use both.
    Boot Camp provides to full power of your MBP and for many, most importantly it has direct graphics support where Parallels does not. My MBP has replaced my Dell PC and this is now my "full time" PC as well as my travel/TV watching Mac.
    Parallels on the other hand has the advantage of being a very quick and simple solution for those that predominantly use Mac OS X who additionally require sporadic use or lower performance applications in Windows.
    Now that Parallels now allows you to utilise your Boot Camp partition, resulting in only a single Windows license, partition and disk usage I think many will find benefit from using both depending on the momentary need.

  • Query as Web Services!!! What are its uses and why do we need it?

    What are its uses and why do we need it.. if other tools like Dashboard and crystal reports and Webi can connect to universe and create reports and Analytics...

    Hello  Rajsan Madhavarajan  
    Query as a Web Service (QaaWS) is a SAP Business Objects (BOBJ)  client-side tool that allows users to create and publish Web Services that can be made available over the Web.  Once these web services are created and published,  they can be consumed like any other standard Web Service in software applications including Xcelsius and Crystal Reports.   But first we have to understand what exactly is a Web Service.
    Web Service
    A Web Service is a software system that supports  interoperable interaction over a network from one computer or machine to another but is more commonly defined as a client and a server communicating data over the Web using the HTTP Protocol. Using Web Services along with Business Objects allows a live connection of data to be used in applications such as Xcelsius and Crystal Reports through a semantic layer called a Universe.
    Query as a Web Service (QaaWS)
    The two main components in QaaWS are the Client Tool and the Server.  The QaaWS Client Tool gives the end user an easy to use wizard that allows them to create Universe queries and publish them as Web Services.  Once the QaaWS is published, any user can securely access the data that the Web Service contains as long as they have access to that server. Have a look on  image below that shows the information flow to and from the server via the client.
    Advantages to QaaWS:
    Very easy to use and intuitive interface Familiar look and feel for people who have used Web Intelligence
    Leverages existing Business Objects Universes Shares metadata with Web Intelligence, Desktop Intelligence and Crystal Reports
    Maintains Business Objects Enterprise Security
    Allows live data feeds to be incorporated into Xcelsius Dashboards and Crystal Reports

  • What power supply attachement do you use and why?

    Hey All! im curious i use to use the AC wall plug that came with the magsafe charger but recently started using the power cord for more length. I started using it since im home most of the time and the outlets are pretty far from the sitting arrangements. So what do you use and why?
    Thanks!

    I use the longer one all the time, as I usually end up aways away from a plug, and its easier to fit into an outlet or power strip that is already overburdened with warts.
    I don't understand why one cord is grounded, and the other is not. The brick clearly doesn't need grounding, so why is the longer cord grounded? Is it some sort of weird law?
    When travelling, I ALWAYS throw the little short flip-out plug in though, just in case I am in some archiac building that has not been updated with 3-prong grounded wiring. I also heard that in Canada, most or all of the plugs are two-prong only.

  • What photo editing software is everyone using and why?

    I am trying to find a good photo editing software to use and before spending any money on it would like to hear everyones opinion on what they use and why? Originally I intended on purchasing aperture ... but I am under the impression that aperture is being discontinued so now I am searching again ... thanks for everyones input in advance....

    If after trying out iPhoto's editing capabilities for a while you find you want more capability give Adobe Photoshop Elements for Mac a try.  It's reasonably priced and can do about 75% or so of what the full Photoshop can do like these:
    There's a free, open source application that's a lot like the full Photoshop: GIMP for Mac.  Another full featured editor along these same lines is Pixelmator.
    Some Image Editors That Support layers:
    Photoshop Elements 11 for Mac - $79
    Pixelmator - $60
    GIMP for Mac - Free
    So there are a lot of choices out there to investigate.

  • What pacman and or AUR warpper/helper do you use and why?

    What pacman and or AUR warpper/helper do you use and why?
    Last edited by jrussell (2013-04-07 12:40:07)

    tomk wrote:
    None, because I don't need one.
    Just in case you meant to say "AUR wrapper/helper", I use cower.
    I forgot AUR, thanks

  • May i know what is plugin-container.exe and why it need internet access , noticed that it started only when i visit any website has Flash containt ? is it adobe flash player plugin ? is it safe to use ?

    May i know what is Plugin-container,exe and why it need internet access ? noticed that it starts only when visit any website has flash containt on webpage . is this adobe flash player plugin ? is it safe to use ?

    See http://kb.mozillazine.org/Plugin-container_and_out-of-process_plugins

  • What is better to use for CTM: PDS or PPM?

    what is better to use for CTM: PDS or PPM?
    what is easier to manage and use in CTM : PDS or PPM? and why?thanks
    elena

    Hi ,
    In CTM I will recommend  PDS over PPM.
    You can directly CIF PDS as SNP PDS from ECC, you do not have to convert from PPDS to SNP unilke PPM.
    PDS supports VC, Phantom assemblies.
    PDS can be maintained in ECC and change transfer is easy.
    Validity period of components can be specified in the PDS , Which is not possible in PPM.
    SAP is developing PDS for future use compared to PPM.
    Regards,
    Pavan Verma

  • I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    Why do you need a expensive MacBook Pro?
    Your attending high school and unless everyone else is rich also your likely going to be a target by the more poorer students for theft or damage to the machine.
    You could keep it home, but if you need it for class then your exposed again.
    Also at that age your not very careful yet, a MacBook Pro is a expensive and easily damaged machine.
    Unless your made of money and so are others at your school, I would recommned a low profile, just does the job cheap Windows PC.
    If it dies, gets lost, stolen or damaged because of your inexperince handling senstivie electronics then it's no big deal.
    You can buy a Mac later on when your sure you have a need for it, currently there isn't much advantage of owning a Mac compared to a PC, they do just about the same things now, one just looks prettier than the other.
    Since 95% of the world uses Windows PC's your going to have to install Windows on the Mac in order to keep your skills up there or be unemployed, so it's a extra headache and expense.
    good luck

  • What is better ti use entourage or my .mac account to vidoe chat?

    What is better to use entourage or my .mac account to video chat?
    How do I add a buddy into my entourage buddy list?
    Message was edited by: fotomike

    Entourage is a Microsoft application and is probably Linked to MSN for Mac.
    I have Office:Mac 2000 and this version of MSN does not Video.
    9:24 PM Tuesday; December 18, 2007

  • What is better to use a calculation field or to use stored procedure

    Dear All
    i want to know what is better to use a calculation field on oracle forms , or to do the calculation using a stored procedure at the data base level and fetch the results to the fields on the form
    Best Regards

    Hello Mohannad
    the stored procedure approach might be more readable and maintainable when the calculation gets complicated.
    And it might be easier to reuse when it's needed in another part of your application.
    Bernd

  • What is your favorite transaction and why?

    Just wondering what your secret tools are... Willing to share? Transactions you use all the time, and without them you would be, uh, toast...
    My favorite one is SE84 Repository Information System. I use it regularly to find objects in repository, like database tables, views, table fields, function groups, function modules, programs, logical databases, message classes, message number, SET/GET parameters, transactions, variants, screens, business add-ins, customer exits, change requests and authorizations.
    A useful hint: You can also search by application hierarcy. For example, in 4.6c to find customer exits within MM, do as follows:
    1. Start SE81
    2. Select subtree MM with F9
    3. Click Information system. SE84 is displayed.
    4. Click Envir. and then Exit techniques and then Customer exits. Click enhancements. A search screen is displayed and development class field is pre-filled.
    5. Press F8
    What is your favorite transaction and why?
    Regards,
    Jarmo Tuominen

    clearly SE80.
    Starting 4.7 you have a button on top of the tree navigation where you can click the information system.
    So you have (at least) three transactions in one: SE80, se84(85 and SE38.
    I wonder why still some people prefer SE38. It's just SE80 minus functionality and overview plus wasted screen space.
    Is there any existing function you can execute from SE38 that is not available in SE38? A lot the other way round.
    regards,
    Clemens

  • Download the updated version of the software can not use and why?

    Download the updated version of the software can not use and why?

    It will help if you tell us what model of iPod touch you have, how and from where you downloaded the update, what version of iOS this update is, and details about the problem; "can not use" doesn't give us anywhere near enough information on which to base a diagnosis and offer suggestions.
    Regards.

  • Whats the maximum length array and why?

    Whats the maximum length array and why?
    I tryed to search the forum but most people was wondering about the maximun length of a String..

    for(int i =20;i<=32;i++) {
         try {
              int[] p = new int[(int)Math.pow(2,i)];
              pause(2000); // So that gc doesn't clean away the array before
                              // The OS memory manager gets to update.
              System.out.println("Paused! i: " + i);
         } catch(OutOfMemoryError e) {
              System.out.println("Ex!!");
              pause(10000); // Same sa before.
    void pause(int p) {
         try {
              Thread.sleep(p);
         } catch (Exception e) {}
    }I worte this little code to test this.
    It runs to 2^23 for me.
    I am running
    AMD Athlon, 512 DDR, Windows 2000 SP4
    java version "1.5.0-beta2"
    Java was using 42116 Kb RAM and 54632 Kb Swap when its at 2^23

  • Why is itunes so hard to use - and why can't apple fix it?

    why is itunes so hard to use - and why can't apple fix it
    I dont know anybody who likes the way itunes works.'
    This last version is beyond awful. It took an already hard to use program - but one that I had at least figured out and made it even harder.

    Wendy,
    If you are experiencing a particular problem, please post specifics, and most likely someone here will be able to help.

Maybe you are looking for