Using ROWID in SQL queries - Page 3
DBAsupport.com Forums - Powered by vBulletin
Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Using ROWID in SQL queries

  1. #21
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    No I didn't found it anywhere, and up until now I haven't found any article that discuss this "odd" behaviour (althoug it realy isn't so odd after all...). As I said, even Steven Feuerstein was not avare of that.
    I must say I am very intrigued by this fact. It is a mystery to me why in the WHILE clause it runs through the loop for sometime (my tests: from 50 to 5500 times). At first I thought that it waits for the second to change but later I observed that once it was waiting for 4 seconds.

    But my friend being a suspicious soul, wanted to be absolutely sure and by testing it in "supposed-to-be" an infinite loop discovered that I was wrong.
    In Oracle7, I used to test for TRUE by IF 1=1, however, I never used IF sysdate=sysdate :-)




  2. #22
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by julian
    I can't provide any URL that proves that
    :-) That's what I thought...
    Ok, I'll change my answer. *Any* oracle Concepts manual (lots of URLs ) proves that. There you'll find that if Oracle need to find *any* information abot the rows in a table it can only find that information by reading it from coresponding database blocks. Isn't this self evident? (If you'll ask me to specify where in the manuals this is written I'll ignore that question .)

    You are asking Oracle "How many rows there are in table TEST?".
    No, I was asking about the PUZZLE, did you make it or did you see it somewhere.
    ???? Isn't your answer to my comment a little out of the context?

    Where can Oracle get this information from? Only by reading blocks that hold those values.
    Reading the blocks or the block headers?
    Aren't you desperately trying to pull yourself out by reaching for straws? Block header is nothing but a part of the block. Your original claim was that (persumably) in 8i Oracle doesn't have to read blocks if you are asking only for pseudo columns and not for the real columns. My point was: blocks must be touched no matter if you don't realy select any particular column values.

    (Oh, I just discovered that I made a typo in the following senrtence of my explanation: "Where can Oracle get this information from? Only by reading blocks that hold those values." It realy should be: "... Only by reading blocks that hold those rows)
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #23
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Aren't you desperately trying to pull yourself out by reaching for straws? Block header is nothing but a part of the block.
    When you borrow a book from the library do you read the book or the library :-)


    Your original claim was that (persumably) in 8i Oracle doesn't have to read blocks if you are asking only for pseudo columns and not for the real columns.
    I said: that is what I have heard and I asked if it is true. Read carefully!


  4. #24
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    [QUOTE]Originally posted by julian
    When you borrow a book from the library do you read the book or the library :-)
    Sigh...

    I said: that is what I have heard and I asked if it is true. Read carefully!
    Your actual argument was:
    Originally posted by julian

    I thought that Oracle has made the change in 8i so that if you do not touch the real column, i.e., if you go for just pseudo-columns, then block is not read.
    Not "that's what I've heard", but "that's what I think", isn't it? But it realy doesn't matter if you "think" or if you "have heard", my point was very clear: If you only realy give it a second thought it is more than self-evident that number of records can only be gotten from database blocks themself! Oracle can make no trics there... And no need for any "reliable URLs" to prove that .

    My bottom line: The discussion of COUNT(rowid) vs. COUNT(1) vs. COUNT(*) is pointless, it is a no-isue. It is known that there is absolutely no difference among them. The discussion about COUNT() only leeds away from the real isue about this topic "Using ROWID in SQL queries " is somewhere else - READ CONSISTENCY! My basic claim was and still is: Wherever Oracle guarantees read consistency it is safe to use ROWIDs! I guess I should have entiteled this topic differently: "Using ROWID in SQL queries in the context of read consistency".
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #25
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Not to make light of this very intense discussion, but I'm quite tickled to see you getting flustered, Jurij. You're starting to sound like me

    - Chris

    'Come over to the dark side, Luke....'

    [Edited by chrisrlong on 09-05-2001 at 11:23 AM]
    Christopher R. Long
    ChrisRLong@HotMail.Com
    But that's just my opinion. I could be wrong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width