How Does oracle extract records in physical order? (From itpub)

Source: Internet
Author: User

  Add a topic to a database


Author

Topic


X_X
Depressed for a long time ......

Registration Date: 2002 Oct
From: Fuzhou
Number of posts: 458

How to extract records in physical order?

RT
Select * from tabname and select/* + first_rows */from tabname?
Thank you.


__________________
I miss you not because I miss you, but because I miss you. The feeling of being lonely is so important, just because you think too deeply!

04-08-13

Qinhuai night month
Senior Member

Registration Date: 2001 Sep
From:
Number of posts: 571

What is the physical order?
Is the order in the block? Or the time sequence of records?


__________________
War brings wealth and wealth brings about the next war

04-08-13

Li2
Senior Member

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

A problem: if it is a parallel query, is the query merging in physical order?


__________________
The gentleman is always dry.

When I am silent, I feel full; I will speak,
Feel empty at the same time

04-08-14

X_X
Depressed for a long time ......

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 time sequence of records?

It should be the time sequence of record generation
In fact, what I want to ask is: is the order of data retrieved by select * From tabname the same?


__________________
I miss you not because I miss you, but because I miss you. The feeling of being lonely is so important, just because you think too deeply!

04-08-14 :53

Qinhuai night month
Senior Member

Registration Date: 2001 Sep
From:
Number of posts: 571

Quote:

Initially released by X_X

It should be the time sequence of record generation
In fact, what I want to ask is: is the order of data retrieved by select * from tabname the same?

I feel that the select * from table is always scanned by block (it has not been verified by experiments, but it should be so in terms of efficiency ), the records inserted later may use the space left by the previous delete, so this is not necessarily in chronological order.
In fact, relational databases emphasize physical independence. All operations only ensure the logic layer. If you want to extract rows in chronological order, you 'd better add a column to record the generation time of rows.


__________________
War brings wealth and wealth brings about the next war

04-08-14 13:21

Grassbell
Deep discussion area bamboo

Registration Date: 2003 Jun
From: Beijing, Xiamen
Number of posts: 1018

Quote:

Originally released by Qinhuai night month

I feel that the select * from table is always scanned by block (it has not been verified by experiments, but it should be so in terms of efficiency ), the records inserted later may use the space left by the previous delete, so this is not necessarily in chronological order.
In fact, relational databases emphasize physical independence. All operations only ensure the logic layer. If you want to extract rows in chronological order, you 'd better add a column to record the generation time of rows.

Select * from table return values:

The rows in the same block are read in the order of row dictionary in the block header. Delete and insert again. Later, the row may use the deleted row in the row dictionary position.

However, the order between blocks is probably determined by the order in which blocks is arranged in the segment.


__________________
Donny's Email

Instead of your own, you can do more research, experiment, and write your own experiences.

04-08-14 16:03

Grassbell
Deep discussion area bamboo

Registration Date: 2003 Jun
From: Beijing, Xiamen
Number of posts: 1018

Refer:

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

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


__________________
Donny's Email

Instead of your own, you can do more research, experiment, and write your own experiences.

04-08-14 16: 05


The current time is.


Add a topic to a database

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.