How to make single full scan

Hi, ALL
I have this query like below and I see that it produced 3 <TABLE ACCESS FULL> for each Unioin, how to make it work with single Scan? It's simple table 2 colums, not indexes or PK, just for sample.
explain plan for
select count(*) from tt where amt between 0 and 100  union all
select       count(*) from tt where amt between 100 and 200  union all
select       count(*) from tt where amt >200 
| Id  | Operation           | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                                                
|   0 | SELECT STATEMENT    |      |     3 |    39 |     9  (67)| 00:00:01 |                                                                                                                                                                                                                                
|   1 |  UNION-ALL          |      |       |       |            |          |                                                                                                                                                                                                                                
|   2 |   SORT AGGREGATE    |      |     1 |    13 |            |          |                                                                                                                                                                                                                                
|*  3 |    TABLE ACCESS FULL| TT   |     2 |    26 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                                
|   4 |   SORT AGGREGATE    |      |     1 |    13 |            |          |                                                                                                                                                                                                                                
|*  5 |    TABLE ACCESS FULL| TT   |     3 |    39 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                                
|   6 |   SORT AGGREGATE    |      |     1 |    13 |            |          |                                                                                                                                                                                                                                
|*  7 |    TABLE ACCESS FULL| TT   |     3 |    39 |     3   (0)| 00:00:01 |                                                                                                                                                                                                                                
Predicate Information (identified by operation id):                                                                                                                                                                                                                                                         
   3 - filter("AMT">=0 AND "AMT"<=100)                                                                                                                                                                                                                                                                      
   5 - filter("AMT">=100 AND "AMT"<=200)                                                                                                                                                                                                                                                                    
   7 - filter("AMT">200)                                                                                                                                                                                                                                                                                    
Note                                                                                                                                                                                                                                                                                                        
   - dynamic sampling used for this statement                                                                                                                                                                                                                                                               

SQL> explain plan for
  2  select count(*) from emp where sal between 0 and 100  union all
  3  select       count(*) from emp where sal between 100 and 200  union all
  4  select       count(*) from emp where sal > 200
  5  /
Explained.
SQL> @?\rdbms\admin\utlxpls
PLAN_TABLE_OUTPUT
Plan hash value: 3840822464
| Id  | Operation         | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT  |          |     3 |    12 |     3  (67)| 00:00:01 |
|   1 |  UNION-ALL        |          |       |       |            |          |
|   2 |   SORT AGGREGATE  |          |     1 |     4 |            |          |
|*  3 |    INDEX FULL SCAN| EMP_IDX3 |     1 |     4 |     1   (0)| 00:00:01 |
|   4 |   SORT AGGREGATE  |          |     1 |     4 |            |          |
|*  5 |    INDEX FULL SCAN| EMP_IDX3 |     1 |     4 |     1   (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
|   6 |   SORT AGGREGATE  |          |     1 |     4 |            |          |
|*  7 |    INDEX FULL SCAN| EMP_IDX3 |    14 |    56 |     1   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   3 - access("SAL">=0 AND "SAL"<=100)
       filter("SAL"<=100 AND "SAL">=0)
   5 - access("SAL">=100 AND "SAL"<=200)
       filter("SAL"<=200 AND "SAL">=100)
PLAN_TABLE_OUTPUT
   7 - access("SAL">200)
       filter("SAL">200)
24 rows selected.
SQL> explain plan for
  2  with t as (
  3             select  count(case when sal between 0 and 100 then 1 end) cnt1,
  4                     count(case when sal between 100 and 200 then 1 end) cnt2,
  5                     count(case when sal > 200 then 1 end) cnt3
  6               from  emp
  7            )
  8  select cnt1 from t  union all
  9  select cnt2 from t  union all
10  select cnt3 from t
11  /
Explained.
SQL> @?\rdbms\admin\utlxpls
PLAN_TABLE_OUTPUT
Plan hash value: 2586840053
| Id  | Operation                  | Name                        | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT           |                             |     3 |    39 |     6  (67)| 00:00:01 |
|   1 |  TEMP TABLE TRANSFORMATION |                             |       |       |            |          |
|   2 |   LOAD AS SELECT           |                             |       |       |            |          |
|   3 |    SORT AGGREGATE          |                             |     1 |     4 |            |          |
|   4 |     TABLE ACCESS FULL      | EMP                         |    14 |    56 |     3   (0)| 00:00:01 |
|   5 |   UNION-ALL                |                             |       |       |            |          |
PLAN_TABLE_OUTPUT
|   6 |    VIEW                    |                             |     1 |    13 |     2   (0)| 00:00:01 |
|   7 |     TABLE ACCESS FULL      | SYS_TEMP_0FD9D662A_D5091620 |     1 |     4 |     2   (0)| 00:00:01 |
|   8 |    VIEW                    |                             |     1 |    13 |     2   (0)| 00:00:01 |
|   9 |     TABLE ACCESS FULL      | SYS_TEMP_0FD9D662A_D5091620 |     1 |     4 |     2   (0)| 00:00:01 |
|  10 |    VIEW                    |                             |     1 |    13 |     2   (0)| 00:00:01 |
|  11 |     TABLE ACCESS FULL      | SYS_TEMP_0FD9D662A_D5091620 |     1 |     4 |     2   (0)| 00:00:01 |
18 rows selected.
SQL> SY.

Similar Messages

  • Please Help!  I have been writing using - Pages - app for years.  I still can not figure out how to make single spaces between paragraphs.  Pages automatically double spaces between paragraphs.

    I have been writing on - Pages- app for several years.  Pages automatically uses double space between paragraphs. I can not figure out how to make single space between paragraphs. Tried everything.  Please help!  

    Pages User Guide >  http://manuals.info.apple.com/en_US/Pages_UserGuide.pdf
    Open the user guide then press Command + F on your keyboard.
    Type line spacing in the search field top right corner of that window.

  • How to make single file from multiple PDF image?

    Hi, it's my first question in SCN.
    I promise my efforts for developing this site.
    Lately, I made multiple PDF image by function 'CONVERT_OTFSPOOLJOB_2_PDF'.(each spool ID)
    And I wanna make single .PDF file by merging these image in server directory(not local PC).
    So I tried it following.
    1. Each internal table resulted from CONVERT_OTFSPOOLJOB_2_PDF append one internal table.
       BL_PDF + MF_PDF → PDF
    2. Excute following command.
      OPEN DATASET P_FILE FOR OUTPUT MESSAGE LV_MSG IN BINARY MODE.
      IF SY-SUBRC = 0.
        LOOP AT PDF.
          MOVE PDF TO FIELD.
          TRANSFER FIELD TO P_FILE.
          CLEAR PDF.
        ENDLOOP.
        CLOSE DATASET P_FILE.
      ENDIF.
    But files was not merged, only last image was made as .PDF file instead.
    How can I do it?
    Thank you.

    Hi Sangrok,
    Instead of preparing PDF multiple times, you can combine all the OTF data and then finally convert it into PDF. For saving the PDF onto application server, you can refer following report.
    http://wiki.scn.sap.com/wiki/display/Snippets/To+convert+spools+to+PDF+and+place+it+in+Application+server+with+the+Generated+Partner+ID
    Regards,
    Aditya

  • PSE6 - How to make a full HD (1920x1080) TV slide show

    I have a full HD TV (1920x1080, PAL).
    How to make a slide show (wmv) with that resolution in PSE6.
    Under "Send to TV" the option Widescreen High Definition (1280x720) is the best resolution.
    Under "Save as a File" High (800x600) and DVD PAL (720x576) have the best resolution.
    Thanks
    Hagen

    Hagen Dufner
    These profile are for writing the .wmv file and are therefore found (as cited) going the "Save As A File" route. You are not going to access them via "Send to Premiere Elements" since no writing to wmv is involved there.
    I too downloaded the WMEncoder 9. When I go the route cited down to tv_profiles and open that and when I click on one of the profiles, it now opens in the WMEncoder 9 Editor (Utilities). So you get an idea of what is required for what exists and edit one of these exiting profiles.
    As I said, Photoshop Elements 6 already has a profile for 720p. I am in the process of trying to generate one for 1080i which will give me this option for exporting a wmv slideshow from Photoshop Elements 6 to Premiere Elements 4.
    As I see it Premiere Elements 4 has project presets for HD 720p and 1080i. found in Setup via the program's Welcome Screen. As for Export of the project on the Timeline, you can:
    Burn to Blu-Ray Disc, MPEG2 1080i NTSC Dolby or MPEG2 1080i PAL Dolby.
    If you use Export/Personal Computer, both the MPEG and Windows Media formats have Presets for 730p and 1080i.
    So it is not clear what profile you want to create in Premiere Elements 4. Right now Premiere Elements supports only 730p and 1080i. My work is still in progress, and at this time I do not know (a) if Premiere Elements 4 will support a 1080p profile if created (b) where such a file would go in Premiere Elements 4.
    To be continued....

  • How to make it full screen

    Hello
    I have made a slide show and I will be showing it threw a projector and I do not know how to make the slide show full screen.
    So how do i make the show be full screen?
    Thanks
    Greg Wyatt

    hey there Greg & welcome to Discussions.
    connect the projector to the Mac using the appropriate adaptor & cable, open System Prefs. > Displays > Detect Displays > Gather Windows. set rez for the projector & turn off Mirror. that's how you play your slideshow "through" the projector.
    good luck.

  • Why can't Apple and HP get Mountain Lion 10.8.4 to work with the HP OfficeJet 7610?  Does anyone know how to make the wireless scanning work?

    Does anyone know how to make the HP OfficeJet 7610 (latest version) and iMac 3.4 GHz i7 running 10.8.4 work together correctly?  Print function seems to work ok.  Just can't find the scanner in any setup.

    In System Preferences/Print & Scan is there a scan option?

  • How to make a full backup of my iPad without using iTunes

    I need to make a full backup of my iPad.  I am using the Vudu app and have many movies downloaded to my iPad.  I have performed a backup of my iPad from iTunes onto my Macbook Pro.  The mobile backup files on my laptop are not nearly big enough for the 20+ movies (at lease 1/2 to1 GB each).   Because of this I do not believe iTunes has made a full backup including the movies.  I want to avoid having to re-download all the movies if/when the iPad drive fails.  I want a complete backup such as Time Machine or using some other external hard drive or app on my MacBook Pro.
    I bought a Seagate Wireless Plus 1TB Mobile Cloud Storage with Built-in WiFi Streaming (STCK1000100) external hard drive and installed the Seagate Media App.  I can, via the app on the iPad, see the device and copy to and from it.  But, it only allows access to music, movies in iTunes (not any movies in Vudu), and things like documents on my iPad.  It does not allow access to all the files inclding system files stored on the iPad.  I also tried another Seagate non wireless external drive that I connected directly to the iPad but the Seagate Media app does not communicate with or recognize the device from the iPad.
    I also bought DiskAid software that supposedly will make a complete backup of an App on a mobile device and installed it on my laptop.  I was able to make a complete backup of the Vudu app from the iPad onto my laptop, but in a test could not restore it to my iPad.  The backup file, though, was the right size, about 26 GB.  The DiskAid techs are looking into that.  I was able to use DiskAid to backup another app in a test (Hertz).  That app made a backup of the Hertz app onto my laptop, I deleted the app on my iPad, then I was able to restore it.  But right now the restore option is not working for Vudu.
    Another option would be to copy the movie files off of the iPad onto my Laptop, but the iPad does not appear in the finder window on the Laptop.
    I have about decided my MacBook Pro laptop will have to be the main repository for all the downloaded movies, since I can make a Time Machine backup of everything. 
    It is very frustrating to not be able to make a full backup of everything on my iPad.
    Anyone else have any ideas?   Apple - when are you going to provide a way to make a full backup of an iPad?

    I recommend Super Duper as well. I use it batch mode to automatically back up my iMAC every night at 2 am. It's saved my life a couple of times- once my disk crashed (under warranty)and what could have been a disaster (1000's of irreplaceable photos) was a 2 day inconvenience.
    Now and then I boot up from my backup on my firewire drive, wipe, check and reformat my internal hard disk, copy back all my files and I'm good to go

  • HT2623 How to make my full name disappear when sending from my primary email address.

    I would like to make my full name disappear when sending from my primary email address. so the recipient when receives my email can see only my email address, i.e. email address of the sender. In Preferences, Accounts, my full name is greyed out and I cannot change it. If I try to do Custom, it would let me change it, i.e. delete my name from Full Name box, but then when Mail is closed and reopened, it would lose the previously saved Custom setting and go back to the same. All my other aliases associated with this email account work ok and the receiver sees only the email address.
    Does anyone know what is going on?

    What if you remove the .mac account from the Accounts panel under mail Preference?
    If that doesn't work, sign into the webmail at me.com, click the "sprocket" button and select preference, in preference go the the aliases tab see if you can remove the email address with your name. If not, go to composing tab see if there is anything you can remove from the +Identity: send email as field+. Good luck.

  • How to make a *full* backup (including the hidden partition), free solution prefered =) [T400]

    Hi,
    I'm planning on messing with my system a little (re-partition, install linux) and I want a full-proof recovery plan. This should work in case I *completely* mess up my HD (bad boot records, destroyed partitions, etc.)
    I have an external hard drive with plenty of free space. How would I make a completely backup; something that would restore everything (including the hidden partition) to its current state?
    Is there any way to do this using free/opensource?
    Keep in mind that if there's a linux app that can do this, I can just boot up using a live CD and run the app from there.
    Thanks in advance.

    Vista or XP? What is/was the partition layout? IIRC, w/XP the 2nd partition is the service partition (hd0,1) and with Vista it is the first (hd0,0).  I don't know if that is always the case, so how is your drive layed out?
    ISTR that with XP the service partition is "hidded' by using an ID of 12 (or something) even though it is a FAT32 partition.  Grub might be unhappy with the ID.  Changing it to "C" might let it boot. That's just a WAG.  My recollection is that the ID only affected where I could install the grub files, not what I could boot.
    I've got some old notes here somewhere:  www.beezmo.com/ThinkPadT61.htm maybe in "partitioning" or Windows XP.
       **** grrr.  the insert link thingy isn't working.  the link above is literally correct, but the forum is inserting some invisible characters ****
    I don't know clonezillla.  Will it let you restore only one of the partitions?  If so, do a restore to factory (with the recovery media you made immediately on receiving the laptop) and then restore only the Vista or XP partition from clonezilla.
    HTH,
    Z.
    Message Edited by zoltanthegypsy on 01-07-2009 06:47 AM
    Message Edited by zoltanthegypsy on 01-07-2009 06:48 AM
    Message Edited by zoltanthegypsy on 01-07-2009 06:50 AM
    Message Edited by zoltanthegypsy on 01-07-2009 06:53 AM
    Message Edited by zoltanthegypsy on 01-07-2009 08:00 AM
    The large print: please read the Community Participation Rules before posting. Include as much information as possible: model, machine type, operating system, and a descriptive subject line. Do not include personal information: serial number, telephone number, email address, etc.  The fine print: I do not work for, nor do I speak for Lenovo. Unsolicited private messages will be ignored. ... GeezBlog
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • How to make PhotoshopAlbumSE stop scanning USB drives

    How to I make Photoshop Album Starter Edition STOP automatically scanning & displaying the images/contents of flash/external drives that get connected? I've looked in Preference and don't seem to find anything that applies.
    Being able to open PA-SE and TELL it to scan a drive for images (and display thumbnails) is one thing...I DON'T want it doing so all on it's own.
    TIA!

    i have already done this - agree with tia - best to be able to tell it to do something (i had three different programs trying to upload images at the same time - nightmare!)
    however, is there a way to remove icon from bottom r.h corner completely? it seems unnecessary to have something 'ready' all the time when i rarely upload photos!
    (i know how to remove it temporarily by "rht click, exit", but it will reappear everytime i start up
    thanks, paddy

  • 3 column page - how to make each full height of page, with variable content in each?

    Hi everyone. . . I'm a relatively unsophisticated page designer, and I appreciate if you excuse my lack of experience.  I'm putting together a page for a business.  The page has three columns, one of which would be considered to be the main body of the page. . . the one with all the important content.  The column on the left is for a navbar and some affiliate badges, and the column on the right will be for an image that describes for the viewer which page they're on. 
    The question I have is how to, when the content of the center column is very long, make the left and right column divtags extend all the way to the footer, with their borders and background colors, to make a clean page.  When the content of the center column is short, like a paragraph or two, the left divtag will have a minimum height due to the presence of the badges, but the right divtag is quite short.
    I uploaded a test page here: http://www.thermalifegroup.com/test/about_us.html
    Nevermind the visual appearance of the page. . . the spry widget is all over the place, but that's just because I uploaded a few files onto the server.  On my pc it's all copacetic and not an issue.  The code source is up there, so is the stylesheet. 
    I'm hoping I can just add a few attributes to the columns so that they automatically reach down to the bottom extents of the page.  Thanks for any advice you can throw my way.
    Keith

    manliusvalerius wrote:
    Hi everyone. . . I'm a relatively unsophisticated page designer, and I appreciate if you excuse my lack of experience.  I'm putting together a page for a business.  The page has three columns, one of which would be considered to be the main body of the page. . . the one with all the important content.  The column on the left is for a navbar and some affiliate badges, and the column on the right will be for an image that describes for the viewer which page they're on. 
    The question I have is how to, when the content of the center column is very long, make the left and right column divtags extend all the way to the footer, with their borders and background colors, to make a clean page.  When the content of the center column is short, like a paragraph or two, the left divtag will have a minimum height due to the presence of the badges, but the right divtag is quite short.
    I uploaded a test page here: http://www.thermalifegroup.com/test/about_us.html
    Nevermind the visual appearance of the page. . . the spry widget is all over the place, but that's just because I uploaded a few files onto the server.  On my pc it's all copacetic and not an issue.  The code source is up there, so is the stylesheet. 
    I'm hoping I can just add a few attributes to the columns so that they automatically reach down to the bottom extents of the page.  Thanks for any advice you can throw my way.
    Keith
    in your #main css style add following attributes
    float:left
    background-color:#eeeeee
    u can change ur color
    try

  • How to make a FULL backup of the MBP

    Hi, I have to sent the MBP in because I have some strange noises. The question is how can I backup my full computer like it is now, erase ( format) it and play the whole thing on it again, when I finaly get the repaired one back.
    I could use one of my FW 500 drives.
    Any ideas??
    Thanks

    I recommend Super Duper as well. I use it batch mode to automatically back up my iMAC every night at 2 am. It's saved my life a couple of times- once my disk crashed (under warranty)and what could have been a disaster (1000's of irreplaceable photos) was a 2 day inconvenience.
    Now and then I boot up from my backup on my firewire drive, wipe, check and reformat my internal hard disk, copy back all my files and I'm good to go

  • How to make single port fowarding  for camera by using airport extreme  ???

    hi
    I have airport extreme model no A1143 (apple)
    when I was using linksys ,I have camera
    I reserve IP local for camera and then by aplication single port foward I put IP local for camera so I would get for the picture or video
    Is any body can help by using apple airport extreme model no A1143
    where should I put the IP local for the camera ?which application
    thanks
    Message was edited by: charlie368

    charlie368, Welcome to the discussion area!
    Using AirPort Utility you can configure the AirPort Extreme base station (AEBS) to forward the port(s) to the camera. However the camera will need to be assigned a local IP address. The default local IP addresses are in the 10.0.1.x range.
    To get to the camera from the internet, you would use the IP address provided by your ISP. This is the one used by the WAN side of the AEBS.

  • How to make single page can only be accessed by one user at the same time

    While a user is accessing a page and modifying the data in this page. Other users are blocked for this page. How can it be realized?
    Any ideas or help are appreciated.
    Edited by: wahaha on Oct 6, 2008 2:49 AM

    wahaha wrote:
    While a user is accessing a page and modifying the data in this page. Other users are blocked for this page. How can it be realized?Assuming your scenario as you havnt mention anything. So means there are n number of users and you want that if any one of them accessing this page then nobody else will have access to that page.
    -> Use flag in DB and whenever user accessing that page set the flag 1 after login and check condition while other user login.
    -> After logout back to 0.
    Well this is possible one of the solution, not the best one.Try to find some other also.
    Sachin Kokcha

  • How to make single rows in tables readonly

    Hi All,
    We have a table that is populated with data from a database read. One of columns in the read acts as a flag. If it is found that particular row is suppose to be readonly. During the read a check is done and if it is is found we call a simple javascript function that should make that row readonly.
    The Code looks like this:
    Code:
    function disableRow (rowIndex) {
      var table = document.all.mainTable;
      var rowAttend = eval("document.all['" + idAttendRow + eval(rowIndex) + " ']");
      var rowVolume = eval("document.all['" + idVolumeRow + eval(rowIndex) + " ']");
      if (table) {
        for (var c=0; c < rowAttend.cells.length; c++) {
          //rowAttend.cells[c].style.backgroundColor = "#1AA047";
          //rowAttend.cells[c].disabled = true;
          rowAttend.cells[c].readOnly = true;
        for (var c=0; c < rowVolume.cells.length; c++) {
          //rowVolume.cells[c].style.backgroundColor = "#1AA047";
          //rowAttend.cells[c].disabled = true;
          rowAttend.cells[c].readOnly = true;
    The colour and disable functions work fine but I can't make the readOnly work. Any help would be great. The cells are a combination of dropdowns and input fields.
    Cheers

    Hi Luke,
    You can't set readonly attribute for cells, because there's no such attribute for cells (tag <td>) in HTML DOM. It will not raise any javascript error, because javascript and HTML DOM allow you to add your customized attribute. In your case "readOnly" will treated as customized attribute.
    In HTML DOM, cells was treated as a container inside row (tag <tr>), it's not an input, that's why it doesn't have readonly property.
    However you can disable all DOM inside cells by set its disabled attribute into true, and that's what your previous code do. But becarefull, if you do this, you can't get all value inside that cell when you submit the Form.
    Usually if I'm facing this problem, I will update the disabled attribute into false, just before submit the form.
    Hope this help
    Regards
    David
    ps:
    1. If you want to disable all cells in one row, just disable the row, it will automatically disable all cells inside it, it will improve your javascript performance.
    2. Your javascript will only work for IE, if you want it to work with other browser, change "document.all[]" with "document.getElementById()"

Maybe you are looking for