From: Kristian Nielsen Date: July 4 2009 8:27am Subject: Re: feedback/review requested for fix to MySQL bug #45458 List-Archive: http://lists.mysql.com/internals/37089 Message-Id: <87y6r47szg.fsf@knielsen-hq.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > On Jun 25, Zardosht Kasheff wrote: >> >> This is a feature request that adds grammar for "clustering" indexes. >> Users can define an index to be clustering (include all of the columns >> in the index), and as a result, a flag is passed into the handler via >> a flag. It is up to the storage engine to properly implement it. >> Storage engines that choose to not implement it can simply ignore the >> flag. If I remember correctly, this enables index from which one can read all columns, but only do random lookups on a subset of columns. So another way to view them is as a restricted (but more efficient in some cases) covering index. There is an obvious generalisation of this idea, by not requiring that _all_ columns can be read from the index. So we could have an index that allows reading (A1, A2, A3, ..., An) but only do random lookups on (A1, A2, ..., Am), for arbitrary m < n. This is much like a prefix index, but with the prefix being on the number of columns indexed, rather than on the number of characters indexed. I think if we were to extend the syntax in a general way for all storage engines, the extended syntax should allow the full generality. - Kristian.