NYCPHP Meetup

NYPHP.org

[nycphp-talk] Table Indexes

Daniel Convissor danielc at analysisandsolutions.com
Sun Sep 28 10:50:06 EDT 2008


On Sat, Sep 27, 2008 at 08:54:10PM -0400, Michael B Allen wrote:
> 
> So is the first column of a primary key always also an index? I
> thought I read somewhere that the columns are concatenated together to
> form one index?

I don't think they're actually concatenated.  The manual says:

   A multiple-column index can be _considered_ a sorted array
   containing values that are created by concatenating the values
   of the indexed columns.

Emphasis on "considered" is mine.  However MySQL stores it, the engine 
has the ability to utilize it.  More information (and the quote above) 
are from 
http://dev.mysql.com/doc/refman/5.0/en/multiple-column-indexes.html

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list