Gray Adams

United States

Age: 18

I am a 15 year old developer and designer.

Nov
24
awarded Famous Question
Nov
12
awarded Notable Question
Nov
6
awarded Yearling
Nov
6
awarded Yearling
Oct
31
awarded Yearling
Sep
24
awarded Autobiographer
Sep
24
awarded Autobiographer
Sep
24
awarded Autobiographer
Sep
24
awarded Autobiographer
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.
1 2 3 4 5