MySQL Forums
Forum List  »  MyISAM

Re: internal rowId
Posted by: Rick James
Date: August 18, 2009 06:28PM

MyISAM is implemented thus (simplified, but sufficient for this discussion):
* Rows of data are appended to the data file (.MYD).
* Index(es) are in a separate file (.MYI) and structured in BTree(s).
* The leaf node of an index points to the data via a record number (for Fixed rows) or byte offset (Dynamic).
* If you have no indexes, the data can still be read, essentially by scanning thru the MYD file.
* UNIQUE and PRIMARY are a constraint -- it will check for duplicate keys. There is no diff in the MYD or MYI than for a plain INDEX.
* The PRIMARY KEY, if it exists, is just like any other UNIQUE index.
* The optimizer understands all of the above, looks at all the indexes, and picks zero or one index to perform each SELECT. If it picks zero, the you get a "table scan", as if there were no indexes.

There is no "rowid" as defined by competing database engines.

Options: ReplyQuote


Subject
Views
Written By
Posted
6719
August 17, 2009 03:09PM
Re: internal rowId
3931
August 18, 2009 06:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.