From: Lloyd Linklater Date: 2008-11-15T00:11:36+09:00 Subject: Re: Convert text string i.e 'Peter' into integer ID Justus Ohlhaver wrote: > Todd, I was told that searching by integers instead of strings would > speed up performance when using large mysql tables. Is that not so? Well, it depends. Searching for numbers can be faster only if the numbers are sorted. For this you would usually have an index. This way, you halfsplit your way to the number you want. i.e. Go the middle: is it bigger or smaller? That narrows your search by half with one check. Then go to the middle of the half it will be in and repeat. The problem with headlines is that you are not necessarily searching for a whole headline. e.g. searching for "man on the moon" might not find "There is a man on the moon again." Then, there is case sensitivity which will affect conversions to numbers often enough. You could have what many websites have: a key word search. You could have a list of key words, "man", "moon", etc., in another file and have that column indexed. Then, you search for keywords and yield all articles that have all of them. That would be fast and cover a lot of bases. IHTH -- Posted via http://www.ruby-forum.com/.