List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 22 1999 3:03am
Subject:Indexing with NULL in column
View as plain text  
>>>>> "Ken" == Ken Cobler <hobbit@stripped> writes:

Ken> Hello,
Ken> I've read in the manual that indexing on a column containing NULLs is not
Ken> allowed in MySQL.  I have a database that I'd like to move from Access to MySQL,
Ken> however, a couple of columns that are to be transfered contain NULLs.  In
Ken> Access, the speed for searching records based upon these columns was
Ken> greatly improved when the columns were indexed (Access does allow columns
Ken> to be indexed with NULLs).

Ken> The main goal is to improve the query speed through MySQL.  If setting global
Ken> parameters allowing for internal cacheing is the answer (rather than indexing),
Ken> let me know.  Otherwise, how do I accomplish a speed up of a query that 
Ken> uses a column which contains NULLs ?

Ken> If the solution is to work on the isam code, to allow indexing on columns
Ken> with NULLs, I'm willing to work on that code.  I've developed a B-tree index
Ken> ASCII database in C.  Where would I begin to examine the code ?  What pitfalls
Ken> might in encounter ?  

Ken> Need a little help/guidance from experienced MySQL people.

Ken> BTW: I have MySQL 3.22.21 running on Linux 2.0.36.  I use ODBC to connect
Ken> Access '97 to MySQL (works great).  I have 12 years experience writing
Ken> C/Unix/database code (worked on the kernel at AT&T Bell Labs). 

Hi!

The new ISAM that will be in MySQL 3.23 is already capable of handling 
keys with NULL (and does this quite efficiently).  Thanks for the
offer thought.  (I now hope to get this out sometimes next week)

Regards,
Monty
Thread
Indexing with NULL in columnKen Cobler22 Apr
  • Re: Indexing with NULL in columnThimble Smith22 Apr
  • Indexing with NULL in columnMichael Widenius22 Apr