How do I get recommendations sql query manually, its possible or not?

I'm new dba oracle and my company gives me sql optimize, if research on google and knowledge, addm can give recommendations of sql query

but I sql query and in addm can not give recommendations,

I then how sql query performance increase... ?

and the sql script to get the recommendations?

Thanks in advance

1. upgrade to oracle 11

2. (take the topgun)

Select / * + RESULT_CACHE * / a.empid, empname from

(select empid, empname from india_emp

where deptno <> 10 and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

Union of all the

Select empid, empname from us_emp

where deptno <> 10 and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

Union of all the

Select empid, empname from uk_emp

where deptno <> 10 and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

Union of all the

Select empid, empname from uae_emp

where deptno <> 10 and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

Union of all the

Select empid, empname from brazl_emp

where deptno <> 10 and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

Union of all the

Select empid, empname from chine_emp

where deptno <> 10 and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

Union of all the

Select empid, empname from jpn_emp

where deptno in (54,256,362,9879,24,46) and empid NOT IN (105,202,11,45,695,646,726,8465,965,56,646,689,446)

) a

order by 2;

3. run the query 3 times.

The query will be lightning fast from the 3rd time

4. read the full performance tuning guide

http://docs.Oracle.com/CD/E11882_01/server.112/e41573/TOC.htm

Tags: Database

Similar Questions

  • How do I get this sql query?

    Hi all

    I'm using oracle 11g.

    I have a table as below:

    [code] create table id_test)

    Identification number, name varchar2 (20)

    ) ;

    [/ code]

    And records like below:

    [code]

    ID NAME

    1 sr

    1 ds

    2 sr

    DS 2

    3 sr

    [/ code]

    where I want to select only the id that have only the name as "sr."

    But as I have 100 names cannot put a not in condition to check other names.

    The expected result would be like:

    [code]

    ID NAME

    3 sr

    [/ code]

    Concerning

    Dale

    Do you want to max (id) name = "SR"... Try the below

    SELECT id,

    name

    GO (select id,

    name,

    ROW_NUMBER() over (ORDER BY id desc) rn

    of id_test

    WHERE name = 'sr')

    WHERE rn = 1

    OR

    SELECT MAX id (id),

    name

    Of id_test

    WHERE name = 'sr '.

    GROUP BY name.

    OR if you want to get the id which is only in SR, then try it out below

    SELECT id,

    name

    Id_test A1

    WHERE name = 'sr '.

    AND NOT EXISTS (SELECT 1 from id_test a2

    WHERE a1.id = a2.id

    AND name! = « sr ») ;

    Post edited by: 000000

  • In the music library, how can I get my songs to sort alphabetically by song, not an artist?

    In the music library, how can I get my songs to sort alphabetically by song, not an artist?

    Go to settings > music > songs of sorting & Albums and select by title. Should be good then.

  • my default calendar on IPhone and IPad has disappeared. I can't see it either on ICloud and do not save on my Mac Book. How can I get it back? Is it possible to return to a previous update in ICloud?

    My default calendar on the IPhone (and IPad) disappeared. I can't see it either on ICloud and make the back not my calendars on my Mac Book. How can I get it back? Is it possible to return to a previous update in ICloud and find?

    Go to iCloud.com using a computer, then settings. When loading this page, look down at left under Advanced and see if you can restore from there.

  • Bought a second hand iphone 5 and my seller did not remove device to find my iphone and im too poor to buy a fresh iphone and my country does not have a retail store, so how do I get it removed icloud? Its imei is *.

    Bought a second hand iphone 5 and my seller did not remove device to find my iphone and im too poor to buy a fresh iphone and my country does not have a retail store, so how do I get it removed icloud? Its imei is *.

    Nobody here can help, and Apple will not help you to overcome the blocking of activation.  If the seller does not cooperate and remove the unit from their iCloud account, then you will never be able to use this device yourself.

    See disable find my iPhone Activation Lock - Apple Support

  • How do you get sound on safe mode if it has not told!

    How do you get sound on safe mode if it has not told? He didn't use to say! It is possible a hacker has stolen the sound and typed it is? It could have been someone who was company or seized that they work in or landed a job at the company laptop I have! phyllisfc

    Frankly I doubt that you ever had its Mode without failure.  Safe mode is a specially designed Windows state that charge only a very minimal set of very generic for devices drivers, so that you can resolve problems or solve problems that cannot be solved with the full software and driver responsible.  Sound is one of the first things that gets tossed by the window, as improved video drivers, network drivers and so on.

  • How can I get Nitro PC installed properly, so it does not say that he may not support a file or a codec required that it blocks and other problems.

    How can I get Nitro PC installed properly, so it does not say that he may not support a file or the required codec, which it does in Windows Media Player, everything seems to go through there and Nitro prevents me from opening photos or electronic-mail/transfer their. Also, what are the appropriate programs to run files in the documents library and photos. recently, I lost all my documents, the files are there but now empty. It happened a little while before had spoken, by buying the GoFlex Seagate plug of iYogi I was stupid enough to buy their storys. Now that I told them that I used to pay $ 400 to renew my contract, which has more than a year and a half left in this regard that they were still treat me worse than ever. I even bought a program that is supposed to protect your bank account, but only have a debit card which they protect not only credit cards, it was not even mentioned in the contract or the sales pitch. The Seagate GoFlex is sitting here unplugged after that they could not challenge or whatever it is to recover after at least 4 attempts. Brief this cowboy got scalped, but if I can get the Nitro to block all my stuff I would be off to a good start to correct things. Also, I had a printer that was supposed to be a fax with all sorts of other gadgets they had me plug with a wire and wireless and never had to use the fax once and continue receiving invalid messages when I try to put in place something like snapfish, which seems to be an automatic link to my set of requirements. I'm lost.

    Maybe their support/forums?

    http://support.nitropdf.com/home

  • How do you get a message that has been marked "do not show this message again" to reappear?

    How do you get a message that has been marked "do not show this message again" to reappear?

    Preferences > General > reset all warnings.

  • How to get the SQL query running of af: search?

    I use JDeveloper 11.1.2.3.0. I have a page where I've set up an af:query and an array of result. The problem is that I can't get the exact query that is used during the execution of this component in a managed bean method. Is it possible to get the query string that is run within the af: query?

    Thank you

    Hello

    Method of the ViewObject getQuery() returns what you need;

    You can replace the executeQueryForCollection(), and prior to calling super, you can print the result of getQuery() method:

    public void executeQueryForCollection (rowset Object,

    Object [] params,

    {int noUserParams)

    System.out.println ("SQL =" + getQuery());

    call the super method here...

    }

  • How can I get the SQL of a tablespace of the database

    Hi all

    I'm using Oracle 11 g R2. I want to get some tablespaces on my database SQL code. in the same way, I get the DDL of the table using the GET_DDL function.

    How can I get that?

    Kind regards

    Just use 'TABLESPACE' instead of 'TABLE' and a name of a tablespace instead of the name of a table and use dba_tablespaces or the user_tablespaces for a list of tablespaces.
    It's a simple as that!

    ------------
    Sybrand Bakker
    Senior Oracle DBA

  • How do I know what sql query is taken on time for the concurrent program

    Hi Sir,

    I am running simultaneous program, which takes time to run, I want to know what sql query causing performance

    Thanaks,

    Anthony

    Hi Anthony,.

    Activate the traces on the simultaneous program and then run tkprof on trace file.

    Octavio

  • How can I get the question mark to come upcorrectly and not as a THURSDAY

    When I change to us the question mark I get this E - How do I get this turned off -

    When I change to us the question mark I get this E - How do I get this turned off -

    Key LEFT ctrl + SHIFT RIGHT button > then shift + question mark key, will give... E

    Repeat the same thing above, it will be back to normal, and he will give...?

    Note: the procedure of 'LEFT touch ctrl + RIGHT SHIFT key' does not have the first time. Try again. He's going to do as I've mentioned above.

  • How can I get a challenge Code now that you do not offer telephone support more?

    try reinstalling Dreamweaver after failed hard drive.  The copy I have is an upgrade version.  But Dreamweaver is NOT an option in the drop down menus.  I can get the screen to enter the code support Code & challenge. (crossed this whey that I first tried to install it) How can I get someone at ADOBE to give me the Code of challenge to install this product?

    It is likely that they won't help, but here's where to find...

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • My screen of photoshop is more remains entrenched, so that when I open an image, sometimes, it will cover the tools on the left.  How can I get photoshop to open the window anchored and not mobile?

    My screen of photoshop is more remains entrenched, so that when I open an image, sometimes, it will cover the tools on the left.  How can I get Photoshop CS 6 to open the window anchored and not mobile?

    Reset your workspaces in an embedded design.

    Mylenium

  • Yet once the list: How can I get a list rather than its label value

    Hello

    I have a selectonechoice

    < af:selectOneChoice label = 'list '.
    value = "{#Selectbank.ListName} '"
    valueChangeListener = "#{Selectlist.onListChange} '"
    ID = "soc1" required = "true" autoSubmit = "true" valuePassThru = "true" >
    < f: selectItems value = "#{bindings." ListVO1.items}"id ="si2"/ >
    < / af:selectOneChoice >

    listVO1 is a siple DB based on VO (select id, label list)
    In my grain of support:

    {} public void onEmployeesChange (ValueChangeEvent valueChangeEvent)
    ListLabel = valueChangeEvent.getNewValue (m:System.NET.SocketAddress.ToString ());

    How can I get the value of the list?

    Check this box
    http://mjabr.WordPress.com/2011/03/19/reading-the-selected-value-of-a-select-list-in-Java/

Maybe you are looking for

  • Flash pro support

    Firefox for Windows uses the Flash plugin, but I didn't need because I have Flash Pro installed on my computer. This gap affects the display of web pages like Facebook. I don't need the plugin. I have no problem to view the same pages with IE or Chro

  • Can I store photos on iCloud and remove them from my phone?

    I'm running out of storage on my phone, and I have a ton of space in my iCloud.  How can I store photos on icloud and then delete them on my phone?

  • cannot get a cd to listen to the message says error 0X00D11BA

    Help please, I'm dying to listen to the music - what is the problem?

  • I can't find my photos in my computer

    Hi there im using windows vista on 10-03-09 I plugged the device using the USB, but nothing happened so I kept changin Ports the only thing that moved the camera even though I had already used it and managed to transfer the photos to the same laptop.

  • HP pavilian dv5 equipped of vista. Unable to connect to the internet

    I have a hp pavilian dv5 equipped of vista.  is not connected to the wireless internet. find and connect to my router, however it does not connect to the internet.  at the same time, I have another laptop in vista that connects very well.  I need hel