In what order will select * return the data?

hi guys,
1) if we just do a select * from emp, will it return the data in the order of the data blocks in the extents. i.e. return all data blocks from extent 1, then from extent 2 and so forth?
2) if we do a select * from emp, and say half the data blocks are already in the database buffer cache, how does Oracle know that the data blocks from emp are already in the database buffer cache? Does it keep some lookup table?
thanks

OracleGuy777 wrote:
thanks guys,
I will mark the question as closed, even though I am still a bit unsure as to why if we just start up a database so that the db cache is empty, and do a select * on a small table that is all on one disk, why the Oracle kernel would from a logical point of view choose different order to return the rows.
but thanks anywayThe order in which rows are returned is a side effect of the execution plan chosen by the Query Optimizer (which is one reason why the ORDER BY clause exists), in plain relational theory both your underlying table and the results are relations (simply an unordered set of tuples) so consequently the optimizer is free to follow whatever method it likes to return the results. In the case of a Rule Based optimizer then there is simply a set of rules that determine the choice of execution plan, in the case of a cost based optimizer then the optimizer attempts to minimize the time taken to return the resultset by choosing an execution plan based on statistical information and algorithms. The existence of the buffer cache is in fact ignored for most practical purposes and certainly for the purposes you imagined.
Now if your table is just that, a straight forward heap table with no indexes then you will likely get what you expect, that is rows returned in the order that the blocks in which they are held are located on disk; this isn't insert order necessarily by the way especially if ASSM is involved. This is only however because a full tablescan is the only available option for satisfying the query. Most tables however aren't like that, they have indexes, the query involves joins and filters and so on. Once you start allowing the possibility of other access paths then you allow the possibilty that rows or rather blocks will be visited in a different order to the simplistic one described above.
Niall Litchfield

Similar Messages

  • What will happen to the data if we delete a disk in ASM

    Friends -
    Question : Under RAC Environment we are using ASM for Storage. I want to know what will happen to the data if we delete a disk?
    Please advise on this.
    Regards
    VSH

    It depends on level of redundancy and disk space left. As long as there's enough space on remaining disks, data would be rebalanced between the disks.
    You can check the ASM operations if you query v$asm_operation:
    select * from v$asm_operation;

  • What will happen to the data I´ve in my Key ring when migrating to iCloud

    What will happen to the data I´ve in my Key ring when migrating to iCloud?
    Any feedback is appreciated
    Uwe

    Hi Winston!
    Thanks for your quick response. I meant keychain items. So I you anserwed my question, perfectly.
    Best
    Uwe

  • OTL I am trying to wright a SQL query that will return the date the timesheet was submitted and date/time it was approved, can anyone guide me on this?

    Hi
    I am trying to wright a SQL query that will return the date the timesheet was submitted and date/time it was approved, can anyone guide me on this?
    I basically need person name who submitted, date - time it was submitted for approval, then the person who approved it and the date - time that it was approved
    Thanks
    Ruby

    Ruby,
    you can start with HXC_TIMECARD_SUMMARY table for submitter detail. But for approver details, i think you need WF tables to get the data for item type HXCEMP.

  • What will happen to the data block after data offloading?

    HI All,
    Since offloading can filter out the necessary information such as unnecessary columns and rows before they are passed to the database, I want to know what will happen to the data block? Will some new blocks be built at this time,which only contains the useful information?
    Best regards,
    Leon

    Andy Klock wrote:
    The statement seems to imply that Exadata has the ability to strip out columns from a block, but a block is a block is a block. Offloading is remarkable at filtering out data in the storage layer that ultimately is not needed but if you only need one row in a block that has 100 rows in it, you still get the whole block (and all 100 rows) to be processed by Oracle. The columns portion of the statement is when HCC is used for a table allowing only the blocks containing the column data required for the query, and thus if a block has 1000 column values in it, it will pass all 1000 column values to the instance to be processed.These assertions are incorrect.
    Blocks sent to the database grid as a result of a Smart Scan contain only the necessary columns and rows for the db grid to do its processing (after filter restrictions and projection restrictions are applied). These Smart Scan blocks are created at run time by the storage server so they have no bearing on the blocks that reside physically on disk which is why they can not be reused by other queries via the SGA and are read directly into the PGA space.
    Regards,
    Greg Rahn | blog | twitter | linkedin

  • External drive not showing up - which disk initialization method will NOT erase the data on that external hard drive?

    Hi,
    as thousands of other users, my WD Passport drive worked like a charm until yesterday and now it wont show on any computer, but does show in the Disk management and when plugged in , the Disk Management offers two ways of initialization : MBR and GPT
    i dont understand any of that and want to know if any of those two methods will make the disk initialize wITHOUT loosing the data on the drive?
    i looked on so many forums and some people say that it will and others that it will not erase the data. 
    can you please tell me what is correct?? also a suggestion is to add some more wording to that initializaiton dialog box so that we can know what initialization does and doesnt
    thank you so much

    Try connecting it to a different computer to see if you can access the data, under no circumstances should you Initialize the drive as all existing data will be lost.
    If you still can't access your files, then remove the drive from the case and connect it via an extra SATA cable and power connector (you usually need a desktop PC in order to do this if the drive is a 3.5 inch model, a 2.5in drive will fit into a laptop
    if you have a spare slot).
    J W Stuart: http://www.pagestart.com
    Never be afraid to ask. This forum has some of the best people in the world available to help.

  • How to consume the webservice if it returns the data in dataset format

    Dear All,
    We have a requirement to consume webservice created in .NET platform. In that webservice they are returning data in dataset format. In this case i am not able to create a proxy. It is showing the following information.
    Cannot generate proxy (object schema mis
    WSDL, see long text)                   
      <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:import namespace="http://www.w3.org/2001/XMLSchema" />
    - <s:element name="getTaskEffort">
    - <s:complexType>
    - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="SPRProjectId" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:element name="getTaskEffortResponse">
    - <s:complexType>
    - <s:sequence>
    - <s:element minOccurs="0" maxOccurs="1" name="getTaskEffortResult">
    - <s:complexType>
    - <s:sequence>
      <s:element ref="s:schema" />
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </wsdl:types>
    - <wsdl:message name="getTaskEffortSoapIn">
      <wsdl:part name="parameters" element="tns:getTaskEffort" />
      </wsdl:message>
    - <wsdl:message name="getTaskEffortSoapOut">
      <wsdl:part name="parameters" element="tns:getTaskEffortResponse" />
      </wsdl:message>
    - <wsdl:portType name="OntimeWSSoap">
    - <wsdl:operation name="getTaskEffort">
      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">This method.</documentation>
      <wsdl:input message="tns:getTaskEffortSoapIn" />
      <wsdl:output message="tns:getTaskEffortSoapOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="OntimeWSSoap" type="tns:OntimeWSSoap">
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="getTaskEffort">
      <soap:operation soapAction="http://tempuri.org/getTaskEffort" style="document" />
    - <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="OntimeWS">
      <documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
    - <wsdl:port name="OntimeWSSoap" binding="tns:OntimeWSSoap">
      <soap:address location="http://hts-pcs-0808/OntimeData/Ontime.asmx" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    I tried to consume webservice http://student.ohecampus.com/projects/group95/stud17/assignment7/validateEmail.asmx, which will return the data in boolean format. In this case, i am able to create a proxy and it is working fine. Can anyone help me out.
    Thanks in advance.
    Regards,
    Karthick

    Dear Raja,
    I checked with webservice owner who created the webservice. They are telling that there is no problem in XML file which they gave. The webservice they provided is consumed in many application and it is working fine. When in SAP, i tried to create a proxy it is showing the in information which i mentioned in earlier posted forum message.
    Kindly advice.
    Regards,
    Karthick

  • A string that can be displayed as both ASCII and hex in an indicator will only save the data to a file in ASCII format

    We can see the data in an indicator just fine, but when we try to write that string of hexadecimal data to a file, it will only save the data in ASCII format.  
    This sounds fairly simple, as the indicator can be selected to display the data in several different formats (VI>Properties>Appearance>Display Style: Normal, Backslash...., Hexadecimal).  However, I have been unable, as of yet, to save the data in different formats.
    Solved!
    Go to Solution.

    altenbach wrote:
    ... or you could just read the string:text.text property to get whatever is actually displayed.
    like this...
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    texttextString.PNG ‏6 KB

  • Before I buy, will I see the date on photos in sorter?

    I'm looking for the right App to make movie / video  files from a photoshow.  I'm interested in iMovie but am concerned that I won't see the date stamp on my photo files like in the iPad photo albums.  I find this very annoying in the Photo app.  You can't sort or anything.  Will I see the date stamp of when the photo was taken if I download a photo to my iPad?  So I can sequence my pictures for a video?
    When I say date stamp, I don't mean a the date and time right on the photo.  I just want to know when the photo was taken and be able to sort a group of photos based on date taken.

    Photos are sorted by date and time, but the date and time is not shown in the app.

  • I want to know what InputField is selected in the table

    Hi Experts
    Please help me
    I have table with 4 columns (each column have TableCellEditor of type InputField)
    I need to know what InputField is selected in the table(or in wich column)

    Hi,
    You can get the selcted row for the table but not for a particular column. Even if you are editing something your input field the complete row would be selected.
    Regards,
    Murtuza

  • If I update my 4th gen ipod to the iOS 5, will I lose the data on my apps?

    If I update my 4th gen ipod to the iOS 5, will I lose the data on my apps?

    If everthing goes as planned, your app date wil be restored to the iPod. To help guard againste a possible mishap. sync (iTunes also creates a backup) the iPod before the udate and caopy the backup file to a save location in case something happens.  The backup is located here:
    Where iTunes backups are stored on your computer
    The folder where your backup data are stored varies depending on the computer's operating system. Make sure the backup folder is included in your periodic data-backup routine.
    iTunes places the backup files in the following places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\

  • Func module to return the date

    hi friends..
    is there any fumc module to return the date and month when you give the date..
    for eg..
      if i give 26.07.2007.
    i want day = 26
             month = 07
    can you plz

    Hi Deva,
    Use the function module
    CMS_API_GENERAL_DATE_TO_DDMMYY
    *note
    *This function module is available in ECC 5.0
    Message was edited by:
            Velangini Showry Maria Kumar Bandanadham

  • I have a iphone5. I went to dubai there it was working properly. On my way back in the plane i turned the manual time zone selection in the date

    I have a iphone5. I went to dubai there it was working properly. On my way back in the plane i turned the manual time zone selection in the date & time setting and changed it to new delhi. when i landed back and tried to use the vodafone network whose sim is installe in te mobile NO SERVICE showed up. I tried to select the time zone & network selection from the carrier but manual selection is not accepted . I got a tiick mark at the service provider name but still no service status remains. After 2 days In the time zone automatic selection has started working and is showing new delhi but still automatic & manual network selection is not working. NO SERVICE is still shown . I m not able to make any calls. Internet through WIFI is working. Kindly help. 

    Hello, swatiy.82. 
    Thank you for visiting Apple Support Communities.
    I would recommend trying the steps in the article below when experiencing this issue.
    iPhone: Troubleshooting No Service
    http://support.apple.com/kb/ts4429
    Cheers,
    Jason H.

  • Z835 What order do I install the drivers?

    I want to do a clean install and I want to be in control what drivers I install, but I need some guideance in what order I should install the different drivers for every thing to work optimal.
    thanks
    Z835-P360 

    Hi,
    its not so tragical how you install them, but if you need a order how to install then you should do it like following:
    Chipset Utility
    Toshiba Console
    Aggressive C3
    Display Driver
    Sound Driver
    LAN Driver
    Wireless LAN Driver
    PowerSaver
    Utilites
    and then the other stuff
    Thats like I would do it :)
    Greetings

  • Formula to return the date of the fourth Thursday in a given month/year

    Using Excel 2013, I need a formula that returns the date of the fourth Thursday in a given month.  For example, if the date in
    A1 = 11/2/2012
    B1 needs a formula that references A1 and returns 11/22/2012
    or if
    A1 = 11/1/2014
    B1 needs a formula that references A1 and returns 11/27/2014.

    You can use this formula:
    =DATE(YEAR(A1),MONTH(A1),CHOOSE(WEEKDAY(DATE(YEAR(A1),MONTH(A1),1)),26,25,24,23,22,28,27))
    This formula has been derived from
    http://chandoo.org/wp/2009/11/25/findout-thanksgiving-date/
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

Maybe you are looking for

  • How do I get my macbook pro to 'see' my external HD attached to Airport BS?

    Hi, I'm still finding my way around my mac and have come up against a wall! I have a Maxtor External Hard Drive attached via USB to my Airport Base Station (firmware 7.1) I can see the Hard Drive is listed in the Airport Utility, I have ticked enable

  • Object XMP lost on PDF export

    Hi there, our workflow relies on the fact that XMP metadata from individual layout objects in InDesign CS5.5 documents will be exported to PDF >= 1.4 (no flattening, live transparency). We found that application of certain effects to placed images in

  • Tree Cell Renderer settings for displaying complete text.

    I have a tree model. It is of the form abc (123.00) -----def (456.00) ----------ghi (678.00) But it is displayed like abc (12... -----def (45.. ----------ghi (67.. I don't want the numbers in the end to be missing. It is a problem for the user to exp

  • Why can't I download a yahoo toolbar

    I have tried twice to down load the yahoo tool bar. Firefox says it isn't compatatible. Why not?

  • Sales order not getting confirmed!!

    we have a situation here. when i see in co09 it looks like following. I am not able to understand why sales order of 70 is not getting confirmed though ample reciept element is available (pch ord)? and why sales order of 350 on 25th aug is getting pa