• sistemas 95572 (3/9/2010)


    Hey pal,

    what do you mean by volatile rowid from the heap?

    Check a couple of posts upstairs, i pointed out the case of a full nulled row, but wasn't sure "why" count(*) included that kind of rows.

    Could it be just implementation desicion?

    Could the count(*) function get its return value from some sort of catalog when there is no where clause, instead of actually getting into the data?

    What I meant is that even though you have a table with rows which have null in every column, every row in the table can still be uniquely identified by the engine, which actually stores the data on pages. If you have rows with null in every column then the odds are that this is a heap table, and from what I understand, the rowid is the only way for the engine to uniquely identify every record in such table.

    I cannot speculate whether implementation of the count(*) gets, as you say, "its return value from some sort of catalog", I just suggested that it might use the rowid (those are always unique and never null) to figure the count. In other words, I suggested that yes, it is "actually getting into the data".

    Sorry that I missed your earlier post, I apologize.

    Oleg