private function doHeavyIndexing()
    {
        $pk = $this->getPrimaryKey();
        $size = count($pk);

        // We start at an offset of 1 because the entire column
        // list is generally implicitly indexed by the fact that
        // it's a primary key.
        for ($i = 1; $i < $size; $i++) {
            $idx = new Index();
            $idx->setColumns(array_slice($pk, $i, $size));
            $this->addIndex($idx);
        }
    }
private function doHeavyIndexing()
    {
        $pk = $this->getPrimaryKey();
        $size = count($pk);

        // We start at an offset of 1 because the entire column
        // list is generally implicitly indexed by the fact that
        // it's a primary key.
        for ($i = 1; $i < $size; $i++) {
            $idx = new Index();
            $idx->setColumns(array_slice($pk, $i, $size));
            $this->addIndex($idx);
        }
    }
private function doHeavyIndexing ( ) { $ pk = $ this -> getPrimaryKey ( ) ; $ size = count ( $ pk ) ; // We start at an offset of 1 because the entire column // list is generally implicitly indexed by the fact that // it's a primary key. for ( $ i = 1 ; $ i < $ size ; $ i ++ ) { $ idx = new Index ( ) ; $ idx -> setColumns ( array_slice ( $ pk , $ i , $ size ) ) ; $ this -> addIndex ( $ idx ) ; } }
Adds extra indices for multi-part primary key columns.

For databases like MySQL, values in a where clause much
match key part order from the left to right. So, in the key
definition <code>PRIMARY KEY (FOO_ID, BAR_ID)</code>,
<code>FOO_ID</code> <i>must</i> be the first element used in
the <code>where</code> clause of the SQL query used against
this table for the primary key index to be used. This feature
could cause problems under MySQL with heavily indexed tables,
as MySQL currently only supports 16 indices per table (i.e. it
might cause too many indices to be created).

See the mysql manual http://www.mysql.com/doc/E/X/EXPLAIN.html
for a better description of why heavy indexing is useful for
quickly searchable database tables.
Adds extra indices for multi - part primary key columns .