leegold2
Technical User
- Oct 10, 2004
- 116
Say I'm searching a table for key words w/eg"....LIKE '%keyword%'", I intend to index for speed. What is better(?) putting all the keywords for a record in one text-type field,
id keywds(text field)
1 frog foo bar perl
2 frog php happy day
vs.
give each each keyword it's own record ie. varchar field,
id keywds(varchar field)
1 frog
1 foo
1 bar
1 perl
2 frog
2 php
2 happy
2 day
Of course the id field relates to other tables holding actual content. The 2nd way seems more granular and maybe faster? What's better?
Thanks.
id keywds(text field)
1 frog foo bar perl
2 frog php happy day
vs.
give each each keyword it's own record ie. varchar field,
id keywds(varchar field)
1 frog
1 foo
1 bar
1 perl
2 frog
2 php
2 happy
2 day
Of course the id field relates to other tables holding actual content. The 2nd way seems more granular and maybe faster? What's better?
Thanks.