Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Question regarding read consistency in Tom Kyte's Expert 10g book

Re: Question regarding read consistency in Tom Kyte's Expert 10g book

From: <xhoster_at_gmail.com>
Date: 05 May 2005 17:53:52 GMT
Message-ID: <20050505135352.221$ll@newsreader.com>


georgejzhang_at_gmail.com wrote:
> Hi,
>
> I am reading Chapter one (still beta) of Tom Kyte's new Expert 10g
> book (http://oracle.apress.com/), and it is really a good read.
>
> However, I have some questions about the read consistency example (page
> 20 - 22) - getting the total balance of accounts table (I would have
> tested it if I could). On page 22, table 1-2, what if T7 and T6
> interchange their position? If the transaction updates row4 and
> commits before the query reads row4, the query would not know that row4
> has been updated,

It would, actually.

> thus getting the total of 1650? That of course does
> not sound right. Can you explain how that happens?

It happens pretty much the same way the uncommitted one happens. Instead the reading query saying "Hey, you are uncommitted, so off to the undo tablespace for me", it says "Hey, you committed after I started, so off to the undo tablespace for me."

> And another question, the same example on page 20, why do we assume
> that the table stores one row per block? What if all 4 row are stored
> in one block?

From the users point of view, it wouldn't make any difference. I assume the one-per-block thing was to serve some pedagogical purpose in some other part of the chapter.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB
Received on Thu May 05 2005 - 12:53:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US