Dean Harding wrote:

still taking up a few bytes per row of memory, like it or not.

Some logic ... statement 1:

The ROWID isn't stored by Oracle (except in your indexes).
... does not coincide with statement 2:

It's "stored" in the same space that MySQL would allocate for

... these are orthogonal statements. Please respond to the request, I'm terribly confused about why you care so much about _rowid's still and I'd love to understand. However, you seem to think that "its stored in the same space ..." is different from "still taking up a few bytes per row of memory ...". These seem like very compatible statements to me (you're agreeing with what I said).

And I'm not saying that the ROWID is of any value to
admins, because it really doesn't make a difference to an admin.  It's
useful for developers, perhaps.

Sorry; I crossed DB admin with DB developper ... I happen to have both titles. That said, I'd like to point out the error of your other comment; (as I understand it, please correct me if I'm wrong) if MySQL doesn't have any indexes on a table (your choice, after all), there is _no_ equivalent of a _rowid _at all_ and the table is scanned for the requested data every time.

In Oracle, because the ROWID is the actual physical address of the row,
it provides O(1) access to a row, as opposed to O(log(n)) that an index
provides. That's a pretty good benefit if you ask me.
I'd love to see the math on that proven; I'm running it through my head now and it doesn't jive ...

There's also no
overhead required when inserting new rows if you're using the ROWID as
your key, because there's no maintenance of an index required by the DB.

This I see as a possible performance improvement, if implemented properly (as Oracle probably does).

Of course, neither of those things is the case with MySQL's _rowid type,
so like I said, the only benefit for MySQL is in migration from
Oracle...

The second makes a difference, yes, but you're free to simply not have any indexes on your table when you insert data, of course, and maintaining an index on an integer primary key has never shown any noticable performance hit in my experience.

Oh, one more point, I'm not advocating the use of ROWID in Oracle
either. Generally, an index *is* fast enough, and since about Oracle 8i
(or maybe it was 9i...), the format of the ROWID changed, because they
upped the limit on the number of datafiles, and hence had to increase
the size of the ROWID. The old ROWID type is still there, but you just
can't use it if you've got more than 1022 datafiles.
So now they're storing two rowids?

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to