purpose of KEY->rec_per_key

Zardosht Kasheff <[email protected]> Wed, 10 Oct 2012 14:23:34 -0400
Newsgroups gmane.comp.db.mysql.devel
Message-ID <CABFd+SGi-6A7ONGDJTobp-Q2vxVi5Rg48hP=abFu7GYep0KbTg@mail.gmail.com>
Hello,

In a the structure KEY, I see a field named rec_per_key that has the
following comment:

  /*
    Array of AVG(#records with the same field value) for 1st ... Nth key part.
    0 means 'not known'.
    For temporary heap tables this member is NULL.
  */

Our storage engine does not ever fill these values. We set the values
to 0. We recently saw that not setting this for the primary key
resulted in a bad query plan. We can set it to 1 for unique keys and
the primary key. Are there other known bad side effects to not setting
this?

Thanks
-Zardosht

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals