Brian Aker wrote:
> Hi!
> 
> On Sep 16, 2008, at 10:15 PM, Jay Pipes wrote:
> 
>> sort (ORDER BY) or compare (WHERE) values in a column based on a
> 
> What if you do not have an index but you still want to call ORDERY BY?
> To me the collation is a property of the column... and possibly we need
> one on the index as well (in the case of INDEX(A,B).

I answered that in my original email (which you snipped out).  There is
no reason to store a collation for a column, since collation is for
sorting and searching.  If a user is sorting or searching on a field
that is not contained in an index, a filesort is needed anyway (just
like it is in MySQL today).  In this case, the filesort is performed
using the qsort compare function pointer in the COLLATION_INFO pointer
of the utf8 charset.

In the case of a field that does have an index on it, the filesort would
not need to be performed if the requested collation is what the index is
stored as.  If it isn't, same as above.  Pull index keys into a
temporary area and issue a sort with the appropriate collation's qsort
comparison function.

The solution I am proposing means that multiple indexes could be
constructed on the same field, but having different collations.

-jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to