Is Sphinx worth it for non-full text search?
I'm facing some problems to optimize SELECT query on a 150M row tables. I'd like to search a md5 ( char(32)) as fast as possible. Do you think Sphinx makes sense in tha开发者_开发技巧t scenario? I've read a lot of things, and it looks realy good for full text search. Is it worth it for my example?
name char(64)
lname char(253)
md5 char(32)
id bigint(20)
Thank you,
Sphinx doesn't make sense in this scenario. You're looking for an exact match. First thing is to index the md5 column. That should cause the result to come up VERY quickly. If it's not fast enough, then you can use caching for faster lookups (and taking load off of the database) - see memcached or something similar.
evan's answer makes sense to me.
if you aren't already using sphynx adding an extra tier to your application needs justification. which means see if it's good enough in mysql, first.
i might be assuming you have other parts of your application already using mysql. if you don't... well then there are a lot of options for less featured DB's that might outperform on raw speed.
精彩评论