indexing a column larger than 767 bytes MySQL

guest2013-1

guest
Joined
Aug 22, 2003
Messages
19,800
Reaction score
13
I have a column varchar(1000) which I keep category information on in MySQL (this is a personal project)

The query I have looks like the following:

Code:
insert into categories (catergoryDescription) SELECT 'thecategory_I_want_to_insert' FROM dual WHERE NOT EXISTS (select * from categories where categoryDescription = 'thecategory_I_want_to_insert')

Basically only inserts when a similar entry isn't found. Now obviously i have performance concerns. And would like to know how I'd go about putting an index on there. Would a fulltext index do?
 
Cool thanks, because I'm worried about a category being longer than 1000 characters anyway (you never know, the users might decide to write their own story in there instead of keeping it short & sweet)
 
Top
Sign up to the MyBroadband newsletter
X