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:
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?
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?