Mysql – Primary key added automatially to seconday indexes on MySQL 5.5

MySQL

I have a table (purchaseorders) that has the following colums:

PurchaseOrderID, PurchaseDate, CreatorID, TotalValue

and a primary key consisting of the field PurchaseOrderID

As I often have queries that do something like this:

select * from purchaseorders where creatorID=100 order by purchaseorderID asc;

I thought of creating a secondary index with the fields creatorID, purchaseorderID

Recently I came across a PPT file on Percona's homepage (Indexing Best Practices for MySQL 5.6) which status (on page 15 in case you have the file too) that
"Primary key is implicitly appended to all indexes), key(A) is really key(A,ID) internally.

Questions:

Anyone know if that also applies for MySQL 5.5?

Do I understand right that I should therefore not (or don't need to) specify purchaseorderID when creating the secondary index, as MySQL adds it anyways.

Best Answer

Yes, this applies to MySQL 5.5 too, but only for InnoDB tables.