List:General Discussion« Previous MessageNext Message »
From:Robert DiFalco Date:April 1 2008 5:01pm
Subject:Indices in InnoDB/MySQL
View as plain text  
I've been told that an index always contains the primary key. So if I
have a LONG ID that is the primary key of table and create on index on
LONG VALUE, the index on LONG VALUE will actually work as a typical
compound index on ID,VALUE. My question is this, if I don't know that
about MySQL and create my indices on purpose (i.e. not taking into
account implementation details about MySQL) I would create the index
explicitly on ID,VALUE. If I did that would I effectively have the same
index as one on just VALUE or would there some how be duplicate data in
the ID,VALUE index (i.e. ID, ID, VALUE)?

R.

Thread
Indices in InnoDB/MySQLRobert DiFalco1 Apr
  • Re: Indices in InnoDB/MySQLBaron Schwartz7 Apr
Re: Indices in InnoDB/MySQLWm Mussatto1 Apr
  • RE: Indices in InnoDB/MySQLRobert DiFalco1 Apr
Re: Indices in InnoDB/MySQLPaul DuBois1 Apr