How does Oracle extract records in physical order? (from Itpub)

Source: Internet
Author: User
Tags date query
Oracle to the Repository previous topic next topic author Theme x_x
Long-term depression ...

Registration Date: 2002 OCT
From: Fuzhou
Number of Posts: 458

How do I extract records in physical order?
Rt
SELECT * from TabName and select/*+first_rows*/from TabName?
Thank you


__________________
Not because of loneliness, but because I think you are lonely. The feeling of loneliness is so heavy, just because you think too deeply!




04-08-13 18:24 Qinhuai Night Moon
Senior Member

Registration Date: 2001 SEP
From:
Number of Posts: 571


What is the physical order?
is the order in the block? or the chronological order in which the records are generated?


__________________
War brings wealth, wealth brings the next war




04-08-13 22:36 Li2
Senior Member

Registration Date: 2002 Feb
From:
Number of posts: 871


There is a problem, if it is a parallel query, query merging is not also in the physical order?


__________________
The gentleman is dry all day long, Shang blame

When I am silent, I feel full, I will speak,
and feel empty.




04-08-14 10:16 x_x
Long-term depression ...

Registration Date: 2002 OCT
From: Fuzhou
Number of Posts: 458


Quote: Originally released by Qinhuai Night Month
What is the physical order?
is the order in the block? or the chronological order in which the records are generated?
Should be the chronological order in which records are produced
In fact, what I want to ask is, is the order of the data in the select * from TabName the same in the order in which they were taken?



__________________
Not because of loneliness, but because I think you are lonely. The feeling of loneliness is so heavy, just because you think too deeply!




04-08-14 10:53 Qinhuai Night Moon
Senior Member

Registration Date: 2001 SEP
From:
Number of Posts: 571


Quote: Originally released by X_x

Should be the chronological order in which records are produced
In fact, what I want to ask is, is the order of the data in the select * from TabName the same in the order in which they were taken?



I feel that the select * from table is scanned by block (not validated by experiment, but from an efficiency standpoint), because the records inserted later may use the space in front of the delete, so this is not necessarily the chronological order.
In fact, relational databases all emphasize physical independence, all operations only guarantee the logical layer, if you want to extract the row in chronological order, it is best to add a column to record the generation time of the line



__________________
War brings wealth, wealth brings the next war




04-08-14 13:21 Grassbell
In-depth discussion of the area of the moderator

Registration Date: 2003 June
From: Beijing, Xiamen
Number of Posts: 1018


Quote: Originally released by Qinhuai Night Month




I feel that the select * from table is scanned by block (not validated by experiment, but from an efficiency standpoint), because the records inserted later may use the space in front of the delete, so this is not necessarily the chronological order.
In fact, relational databases all emphasize physical independence, all operations only guarantee the logical layer, if you want to extract the row in chronological order, it is best to add a column to record the generation time of the line

SELECT * FROM table returns the order of values:

Rows in the same block are read in the order in which row is arranged in the row dictionary of the block header. Delete and then insert, then the row may use the deleted row in the row dictionary position.

But the order between blocks, I presume, is in the order of blocks in segment.



__________________
Donny ' s Email

Not own, more research, do more experiments, the experience written out, become their own




04-08-14 16:03 Grassbell
In-depth discussion of the area of the moderator

Registration Date: 2003 June
From: Beijing, Xiamen
Number of Posts: 1018


can refer to:

Http://www.itpub.net/112239.html

Http://www.itpub.net/247459.html


__________________
Donny ' s Email

Not own, more research, do more experiments, the experience written out, become their own




04-08-14 16:05 all the time.      Now the time is 02:21. Add to the Repository previous topic next topic

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.