How Oracle Read blocks [message #289717] |
Tue, 25 December 2007 21:20 |
lzfhope
Messages: 69 Registered: July 2006
|
Member |
|
|
hi,
In a windows os system,How oracle Read Blocks of a table?
Given a sql like this : "select * from Test_Table" .Test_Table is a table object .
Suppose that ,the table test_table has 10 extents and each extent has 10 blocks .Which order will the oracle use to read this blocks?
|
|
|
|
Re: How Oracle Read blocks [message #289748 is a reply to message #289720] |
Wed, 26 December 2007 00:30 |
lzfhope
Messages: 69 Registered: July 2006
|
Member |
|
|
Under greatly parts of circumstances,i do not care the orders,
But,sometimes this decides order of the query result .
Assume the table has records like these below:
1 ,100
2 ,300
3 ,400
4 ,600
.....
n ,n*100
------
I want that the output will list in order.So the order of reading blocks is important.
Maybe ,somebody say why not using "order by".Yeah,Using the "order by" clause , the oracle will produce the necessary result. But ,I do not want to use the "order by" clause ,neithor the sorted index.
|
|
|
Re: How Oracle Read blocks [message #289762 is a reply to message #289748] |
Wed, 26 December 2007 01:20 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
THE ONLY WAY TO GET A SPECIFIC ORDER IS TO USE "ORDER BY" CLAUSE.
This is a definitive rule.
I already posted examples that show that extents may be read in random fashion.
Regards
Michel
|
|
|