Question regarding using of Explain Plan

Hi. I'm new with Oracle Queries so I have a little obstacles about understanding. I want to learn how to use Explain Plan feature from Oracle
I am using Oracle 9i as back end .
Please tell me how can i use feature of Explain Plan Feature for the below query.
SELECT * FROM emp WHERE empno = 7369
Thanks in advance.

[email protected] wrote:
Hi. I'm new with Oracle Queries so I have a little obstacles about understanding. I want to learn how to use Explain Plan feature from Oracle
I am using Oracle 9i as back end .
Please tell me how can i use feature of Explain Plan Feature for the below query.
SELECT * FROM emp WHERE empno = 7369
Kiran,
Firstly , before anything else, I would suggest to change your handle to anything else and remove the email id from it. Its not good to have the id displayed in any public forum.
About the question, unfortunately, its not that easy to answer. To understand explain plan and how to use it, you need to understand that algorithm/mechanism, whatever you feel like saying, that generates it. Because, explain plan is just the outcome of that mechanism, a final product, its the result of some inputs given by you in the form of your query, predicates, joins and their types and that all bring up the explain plan. Explain plan is basically the constitution of some steps which are used /fixed by optimizer to run the query. I would suggest that you read this page from cover to cover to understand some of the steps and their meanings which are shown to you in the plan. I am giving 10g link as this is a more better version of optimizer than the previous ones and I would suggest you to do experiments on 10g only.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#i21299
And I would suggest that you collect these following books and start reading them. I haven't yet found any thing better than these books.
[Cost Based Oracle Fundamentals (Jonathan Lewis)|http://www.amazon.com/Cost-Based-Oracle-Fundamentals-Experts-Voice/dp/1590596366]
[Troubleshooting Oracle Performance(Christian Antognini )|http://www.amazon.com/Troubleshooting-Oracle-Performance-Christian-Antognini/dp/1590599179/ref=sr_1_1?ie=UTF8&s=books&qid=1240078634&sr=1-1]
[Effectuve Oracle By Design(Tom Kyte)|http://www.amazon.com/Effective-Oracle-Design-Osborne-ORACLE/dp/0072230657/ref=sr_1_1?ie=UTF8&s=books&qid=1240078698&sr=1-1]
It would be real long journey before the mazes of optimizer and explain would be clear so make sure you have patience as well.
HTH
Aman....

Similar Messages

  • Use of explain Plan

    Hi
    I am using explain plan for query.How can i optimize query to see result of explain plan.
    Thanx

    Collect statistics, use hints, create indexes... many ways. You try using of outlines, but it is not common practice. Usually you haven't to influence the plan directly

  • Query regarding Partition table Explain plan

    Hello,
    We are amidst a tuning activity, wherein a large table has been partitioned for better administration. During testing, I was analyzing the explain plans for long running sql's and found a piece that I was unable to understand. The PSTART and PSTOP columns show ROWID as its value, which in normal partition pruning scenario be the Partition number or the KEY. I tried to look around for this issue but did not get enough information. Can anybody help me of what it means? Also, if there is a good explanation of the same, it will be extremely helpful.
    The snippet from explain plan looks like:
    | Id  | Operation                                | Name                          | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     | Pstart| Pstop |
    7 |        TABLE ACCESS BY GLOBAL INDEX ROWID| XXXXXXXXXXXXXXXXXXXX             | 43874 |  9083K|       |  1386   (1)| 00:00:17 | ROWID | ROWID |
    On another similar query it looks like:
    | Id  | Operation                             | Name                         | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     | Pstart| Pstop |
    |   6 |     TABLE ACCESS BY GLOBAL INDEX ROWID| XXXXXXXXXXXXXX               | 22455 |  4648K|       |   456   (1)| 00:00:06 |     9 |     9 |
    I have another query with regards to the Partition tables. Does it, require/benefit if, the Indexes to be in partitioned mode? I tried to read about it but did not get a conclusive evidence. I am trying to test it and post here the outcome, but if anybody has experience of working with it, it would be great to have some advice.
    Oracle Version:- 10.2.0.4
    Regards,
    Purvesh.

    Hi Purvesh.
    Great explanation and example on this this topic...
    Ask Tom "explain plan on range-partitioned table"
    Hope this help.

  • A question regarding using a JDBC class to connect with cloud service database

    Hello,
    I am currently working on a small scale cloud service report where the company I chose is obviously Oracle. My question is regarding the cloud service in the following way. I was doing my report with the free trial until it just came to me that
    why not to do a small one class program with my netBeans or Eclipse that uses JDBC but I am not sure what username, password and the url to use in the connection to retrieve, manipulate and store values. Can somebody help me please if this is possible or not?
    edit: Anyone please? I have a deadline in 15.8. and could create something great until then if I get the anwser in few days

    To correct my question, I already have the oracle account and I created the cloud service trial account with database and java section.

  • Questions regarding using the .monitor command to retur a animated image and we would like feedback to a designed webpage that is monitoring a 5kW windturbine:)

    I'm embedding a front panel image in an existing HTML dokument. I would like to use the command .monitor in the URL together with the refresh command so the VI automatic will reload every 20 secund. This actual work, but simultaneous I want to have the possibility to refresh manually so I don't have to wait 20 sec before new values is shown in the display. Is this possible to do?
    Another question: Since the real time display updates 1-2 times a secund the command .monitor is used to get a animated picture of the Real Time Display.
    There are several ways to add animation on to web pages. The techniques used h
    ere are the �server push� and �client pull�which makes the browser repeatedly reloads a changing inline image to provide crude animated sequences. This is not the most efficient way as this result�s in an image being re-transmitted for each frame of the animation. The command .monitor with the attribute refresh and lifespan in the URL trigger this �server push� and �client pull� techniques.
    I use this automatic refresh uploading of the display so that it each time shows different values, is this called crude animation?Then I'm wondering what I'm suppose to use the command lifespan to?I can't see the use of it in my display.....?
    link to the webpage so you can have a look at the display:
    http://134.7.139.176/.monitor?Real%20Time%20Performance.vi&refresh=20
    This is a project that I'm working together with another Norwegian friend. WE are very happy for feedback on our web page and displays go to: http://www.ece.curtin.edu.au/~peersena/ if you would like to view itThanks

    Annis,
    One of the other things to keep in mind is that the generation of an image does take some computing power so having the generation and the acquistion on the same machine is not always ideal. If you're using the machine that is publishing the front panel just to collect data it's not so much of an issue.
    If you really want to monitor in "Real-Time" using Remote Panels (requies LabVIEW 6.1) is your best option. This posting has more information on using Remote Panels and links to some live examples:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000C0660000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=web+control&USEARCHCONTEXT_QUESTION_S=0
    Remote panels makes it possible to control the application remotely as well.
    With .monitor the only way I've been able to manually refresh is to "Shift+Refresh" on the browser.
    Regards,
    Kamran

  • A question regarding using Myriad Pro as a web font...

    Okay so this is a pretty straight forward question (I think)...
    I've been using sIFR to replace many of the typical web fonts on the sites I build since much like everyone else I'm sick of being restricted to using only certain fonts.
    Myriad Pro is one of the many fonts I really like for building websites. I discovered recently by accident that Myriad Pro (and a few other variants in the Myriad Pro family) are part of Adobe Reader. This means that ANYONE who downloads Adobe Reader has Myriad Pro installed on their system and probably doesn't even realize it.
    Having discovered this it has come to my attention that there is a decent possibility I could use CSS and have Myriad Pro as a web font without even having to render it using sIFR. The problem is that anyone who doesn't have Adobe Reader installed wouldn't see the nice Myriad font.
    So my question is what do all of you guys think about this? Does anyone have any actual numbers in regards to how many people actually have Adobe Reader? If it was a higher percentage like 90% then I think this would be a safe solution.

    I don't know how many people use Adobe Reader, although I would think it's a fairly high proportion. Perhaps not as high as 90%, though. However, there's nothing stopping you from using Myriad Pro as the first choice in a font-family declaration. Browsers use the first available font. You could use something like this:
    body {
      font-family:"Myriad Pro", "Gill Sans", "Lucida Sans", Verdana, Geneva, sans-serif;

  • A question regarding using a Dreamweaver site to manage a WordPress site?

    Using Mac OS X I have installed and configured MAMP to edit a WordPress site.
    I have setup a DW CC site to help with this editing, and all files are behaving as expected.
    I would now like to take this to the next level.
    As I develop the site plan for the future, I am unsure of the local folder structure I need to use if I want to use the capability of the SQL database to manage logins and landing pages.
    In other words, do I put the root folders for other html sites in the same root directory level as the WordPress folder?
    Can I then (with some individual tweaking of php files and the database(s), use this organization method to author a number of standalone sites with unique logins?
    I hope this question is not too vague.
    Thanks

    Sounds to me you want to use the multi-site option in Wordpress. That way you can setup a network of (related or unrelated) sites in Wordpress, and assign different logins, themes, and so on, to each site as well.
    Study the official documentation before you begin:
    Create A Network « WordPress Codex
    In this case you should stay away from any manual mysql tinkering - no need for that with multisites in Wordpress. Of course, you can still use DW to edit the theme files, if you so wish.
    For more multisite user control, check out plugins like:
    http://premium.wpmudev.org/blog/7-plugins-for-easier-wordpress-multisite-user-management/
    If you need ultimate control over user management, payment options, and so on, you may want to install S2 User Management (but it is a complex one to learn).
    s2Member® | A powerful (free) membership plugin for WordPress®

  • Question regarding using links in Discoverer 10g

    Hi All,
    I have a workbook which uses links. The 1st worksheet is connected to the second worksheet using a simple parameter and link. It works fine.
    But when a users saves this report and tries to use the link, Discoverer tries to open the work sheet from the query which I had created and not the one from the worksheet which the user has saved.
    I am not sure if that the regular feature of the Link functionality or if there is a bug/workaround.
    Is it possible to set these reports to open the worksheet from the saved workbook instead of the original one.
    Any help is appreciated. Please let me know if I have confused you.
    Thanks.

    Hi,
    I've had a look at this on Metalink and there seems to be lots of different bugs with manage links on 10g.
    We build our reports under one user and share it with all other users, easier to manage. We've built some reports exactly has you have and it also works fine. I'll try to resave this as another user and see if we have the same problem.
    For info there are links to several different bugs related to lots of scenarios Here (You'll need metalink access).
    Couldn't find your exact problem in there so you want to raise it with Oracle.
    Regards,
    Lloyd

  • Question regarding using Lightroom Web Module and Zenfolio

    I use LR3 and like the galleries I can make in the Web Module.  If I use Zenfolio as a web hosting service, can I upload or export my photos from LR to Zenfolio and use the galleries I create in the Lightroom Web Module,,,or do I need to use the existing gallery templates in Zenfolio?  If that is the case, other than using Lightroom to upload photos, is it's Web Gallery Module superflous?
    Thanks,
    Matthew Kraus

    Matthew,
    If you are asking if you need to use LR's Web Module to export images to Zenfolio, then no you would not use the LR Web Module but rather use a plug-in to export directly to Zenfolio.  Or you can just export to your local HDD and use Zenfolio's upload module to grab the files from your local drive.
    Jeffery Friedl has a nice LR plug-in for SmugMug so I am sure his Zenfolio plug-in will work nicely as well:
    http://regex.info/blog/lightroom-goodies/zenfolio
    It's free, sort of, after the trial period, like 45-days as I recall, there is a limit on the number of files which can be uploaded.  When the trial expires if ya like it you just donate any amount and get to upload any number of files as Zenfolio allows in a session.
    Does that help answer your question?

  • Question regarding use of Log and LogFactory in Servlets

    Hi,
    I saw the following code in an application and I would like to know where the log information would be stored. It appears that the log information is not displayed on the screen and was not able to find out where the log files are. The application was created using NetBeans and was using Tomcat. Thanks in advance.
    import org.apache.common.logging.*;
    public class Test extends HttpServlet
    private static final Log log = LogFactory.getLog(Test.class);
    String theHost;
    String theSource;
    public void init (ServletConfig config) throws ServletException
    super.init(config);
    log.info(�debug Enabled: �+log.isDebugEnabled());
    ServletContext context =config.getServletContext();
    this.thisHost=�/Test/�+config.getServletName();
    etc. etc.
    log.info(�thisHost:�+this.thisHost);
    log.debug(�Source:� +theSource());
    etc, etc.
    }

    It depends on what logging system you have set up.
    Commons.logging is an abstraction layer above logging components. It allows your code to use a variety of logging systems. However those logging systems have to be set up and configured by you. This can be via system properties, properties files, XML config files (depends on the logging system and how you use it).
    So you need to figure out which logging system is being used and then configue that system to write the logs
    matfud

  • Single Edition App question regarding using the activation number

    Hello,
    I am producing a single edition app for a client. We have purchased a single edition package and I have the serial number. I have created the app and done all the certificates and provisioning stuff...
    My question is now that it is built and I would like to download a version for testing purposes it is asking me for the serial number to activate it.
    After I enter the serial number will I be able to go back and make changes to it as needed before I publish? Or how does this work? I just want to make sure I dont activate this and am then stuck with the results if changes need to be made. I'm sure the answer is fairly obvious but just wanted to check with people who have had past experiences. Any and all help is greatly appreciated.
    Thanks!

    Yes, you should be able to make changes, but I can’t let this pass without reminding you that you could have gotten unlimited apps for year and every Creative Cloud application and service for less than you paid for that one app.

  • Question regarding use of advanced actions in drag&drop interactions

    I have trouble figuring out sth in Captivate.
    I am creating an exercise where the user has to drag specific waste items into the correct waste bins. What I want to do is to show the Next button after the user has completed the task.
    There are 6 waste bins, 5 bins have two correct drag sources, 1 bin has 4 correct drag sources.
    I have created 6 variables, one for each of the 6 waste categories, and given them all the initial value of 0.
    If the user puts the correct waste item into a waste bin I have stated in the "action" under "Accept" for the drop target that the variable for this bin should be incremented by 1.
    Further, I have created an advanced action that states that if var_waste_bin_a = 2, then the Next btn should be shown.
    I had thought that each time a waste item is accepted into waste bin a, the variable should be incremented by 1 - thus making the Next btn visible when the two correct drag sources are in place?
    Can anyone help me out on this? Would be much appreciated...
    Kind rgds
    Casper

    Hi!
    Thx a bunch for your answers, truly appreciated! Based on your tips I figured it out.
    The problem with my advanced action was that it caontained the Expression var_paper = 1+1 ( I had thought that this would assign the value with 1 the first time the action was run, and then increment by 1 for each further time)
    I changed the Expression to var_paper=var_paper+1 and for some reason this worked just as I had planned.
    Not sure if I totally understood the logic, but it works just as wanted now
    Thx again!

  • A Question regarding use of Interfaces.

    I have read about interfaces,but I havent got the real grasp or point
    of it.
    1). How is an interface an improvement over classes?
    If I define a class which has several important methods in it,and this class is extended by several other classes,and all these sub classes then call the super class's methods.
    How does an interface be more beneficial?
    2) What is the exact use of creating class intances thru interface references?
    Java talks about multiple inheritance using interfaces.
    If an interface does not have any constructive methods,but just
    empty methods,how does this become more constructive?
    Eventually a class will implement the this interface to give it some
    value? So why dont I write a class straight away rather than creating an interface,implement it and then code the required methods defined.
    I tend to avoid using interfaces becos I find them of no value.
    Rather I wud prefer to define class with some constructive methods
    and extend this class.
    Am I right in my analysis?

    Interface is also a "contract" that the class implementing a particular interface will provide certain functionality to the users of the class. For E.g Serializable interface in Java. All the classes that implement this interface indicate that the objects of these classes are serializable. Similar thing with Cloneable interface, all objects of classes that implement this interface are Cloneable....
    Hope thinking in these terms will help your understanding. Just look at Java interfaces to understand instead of some custom code.

  • Question regarding using two separate IPODs on same computer

    I recently bought my husband an IPod since he loved mine so much. I already had ITunes on my computer (obviously), so I had him signout and then establish a separate account under his name before attaching his IPod to the computer. Once on ITunes, my library remained in the que even under his new name. He was thrilled because it saved him the issue of having to mess with downloading songs. He deleted off some songs, added others, and moved things around. Now, no matter what name you log-in under, the same library and playlists come up. Is there a way to fix this, or avoid it from here on out? I want MY LIBRARY back.

    It sounds like you're talking about logging into your separate iTunes Store/Apple accounts which will only affect which of those accounts is charged for purchases.
    It does not change Libraries or anything of that nature so, unfortunately, unless you made a back-up copy of your iTunes Library file before your husband started making changes, your LIbrary - as it was - no longer exists.
    As for the future, you may want to have a look at this article in the Apple Knowledge Base and let us know if it brings you any combination of joy and/or satisfaction.

  • Why bother to use explain plan?

    All my colleagues used the third party applications, Crystal Report or TAOD, to query data from the 10g R2 database for some kind of reporting. The problem is they always created the query with multiple outer join (> 10 tables) and they WRITE the codes without using the explain plan. They simply used the query for result of the moment and the query they wrote only were used for few time (< 3), because the manager requested the report kept changing the requirement. They did it on both Dev and Prod
    I think it is bad practice, how can I convience them to change their practice?

    The concept that something is ad hoc and therefore doesn't matter can break down pretty quickly when a bright light is shined upon it. But what you are fighting here is more a question of politics than technology.
    If the system is still chugging along at an acceptable speed, no end-user complaints, and practices in your organization range from sloppy to lazy you should probably just polish up your resume and move to a job where people care about professional standards and doing a good job.
    To change a practice such as this usually one must get to the level of childish schoolyard play and create a competitive atmosphere. Take one of those slow queries and tune it. Challenge someone to do better than you did. Offer a beer to anyone that can write it more efficiently than you did, etc. Make it a game.
    But don't be surprised if the reason they aren't running explain plan is that:
    1. They don't know how
    2. They know how but don't know how to read the output
    3. They know how to read the output but haven't a clue what to do about it.
    As an example ... I know a lot of people that think they know how to output an explain plan. In truth not 10% of them understand this:
    SELECT * FROM TABLE(dbms_xplan.display_cursor('cpm9ss48qd32f', 0));
    http://www.psoug.org/reference/dbms_xplan.html
    Which is really rather sad.

Maybe you are looking for

  • Adobe indesign download problems

    I purchased Adobe indesign and trying to download it. I went to the creative cloud webpage and hit download. It says it is downloading. But when I view the creative cloud apps. It says installed but I can't open it. I had previously used the trial. H

  • Sandee mendelson reid : Oracle Error: ORA-01403

    Hi everyone!!! Please could you tell me why I get an error (ORA-01403: No data found) when executing a sql query on Oracle 8i? The query is: "INSERT INTO TABLE1 SELECT * FROM TABLE2" NB: when I run the query "SELECT * FROM TABLE2" I get property regi

  • How do you consult the management of changing entity?

    Hi Experts, I have a problem with BPC to satisify what the customer wants. It is how BPC handles entity changes including hieararchy and member. It also need to bring data behind of the entity code. So here is three types of entity change. 1. Merge E

  • -bash: ulimit: pipe size: cannot modify limit: Invalid argument

    Followed the Oracle documentation to install Oracle 10g R2 on RedHat 4(UP1) x86-64 and I'm getting the following error when I login to the server from a putty client: -bash: ulimit: pipe size: cannot modify limit: Invalid argument Can someone explain

  • Does the Clone repair tool have an Aligned option like PhotoShop?

    PhotoShop's clone stamp has an option that is called "Aligned" under CS3 (not sure of its name in prior versions.) When clicked, there is a fixed spatial relationship between the source and destination pixels, even if you complete one clone operation