Gray Adams

United States

Age: 18

I am a 15 year old developer and designer.

Jul
27
comment SQL match beginning of all keywords
@VladimirChervanev I have tested it with over 45,000 rows, and it returns the same results my own query does.
Jul
26
comment SQL match beginning of all keywords
After running your query, it seems to pull up all tags that contain either "the%" or "wal%" still..
Jul
26
accepted SQL match beginning of all keywords
Jul
26
comment SQL match beginning of all keywords
I would like to agree, but when trying out Gordon's on new searches, it certainly pulls them up faster. Yours pulls them up noticeably slower, but then caches them and makes it quick the second time. I think Gordon's may actually be the best performing one. Though yours is prettier.
Jul
26
comment SQL match beginning of all keywords
Would it make sense that the query takes some time the first time and less time the second? Noticeably so, as well. The autocomplete takes a solid second now. EDIT: While Gordon's solution takes less time when compared.
Jul
26
comment SQL match beginning of all keywords
I hadn't. After doing so, it looks to have increased the performance, making this one a few milliseconds faster.
Jul
26
comment SQL match beginning of all keywords
This solution works as well. Performance wise, for the shows table I have with over 45,000 rows, it seems to be almost identical to Gordon's. Taking only 64ms remotely.
Jul
26
comment SQL match beginning of all keywords
I was wanting to use Fulltext, but due to being on shared hosting, I cannot upgrade to 5.6 so that I may use it on my InnoDB database. I need InnoDB for foreign keys. Unfortunately, the final query returns all shows that match ANY of the keywords, which was the initial problem. I understand that there are native functions in MyISAM databases for this, which likely means it is an effective way to manage the database if the native functions don't already exist (InnoDB).
Jul
26
comment SQL match beginning of all keywords
I am not following why the first query would not be ideal, as it seems to be returning the results I desire. Do you care to elaborate?
Jul
26
revised SQL match beginning of all keywords
added 172 characters in body
Jul
26
comment SQL match beginning of all keywords
If there were another show named "The Walking Alive", then it would not appear with the second query as it should due to the limiter. Removing the limiter, though, may return far too many results and results that are not all relevant or that do not all match. The autocomplete would ideally return not just one show.
Jul
26
comment SQL match beginning of all keywords
@GordonLinoff Thank you, I thought I had.
Jul
26
comment SQL match beginning of all keywords
Hello, the second query returns nothing for me?
Jul
26
comment SQL match beginning of all keywords
@웃웃웃웃웃 This will not work. The field cannot be two values at the same time.
Jul
26
asked SQL match beginning of all keywords
Jul
26
comment Search for data that matches every single tag (using the LIKE operator)
@Rahul Wouldn't doing this sort of concatenation be just one large unnecessary step? At this point, why not just do that LIKE statement directly on the movie's title in the movies table? Are tags still more efficient at this point?
Jul
26
comment Search for data that matches every single tag (using the LIKE operator)
I'll be able to try it out in a couple hours.
Jul
26
comment Search for data that matches every single tag (using the LIKE operator)
This seems to work perfectly!
Jul
26
accepted Search for data that matches every single tag (using the LIKE operator)
Jul
26
comment Search for data that matches every single tag (using the LIKE operator)
Let us continue this discussion in chat.
1 2 3 4 5