在无文本搜索查询中使用 sphinx 与 MySQL [英] Use sphinx vs MySQL on no text search query

查看:42
本文介绍了在无文本搜索查询中使用 sphinx 与 MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个疑问:

假设我有一个大表,它与一个较小的用户表有关系.

Suppose I have a one big table with a relationship to to a smaller table of users.

这个想法是在那个非常大的表中搜索大于给定日期的日期并按分数排序(例如 big int),同时获取相关的用户信息.此查询的结果可能每 10 分钟左右更改一次.

The idea is to search in that really big table for dates bigger than a given date and order by a score (big int, for example), and obtain related user info at the same time. The result of this query can change every 10 minutes or so.

所以,没有文本搜索,但我有一个非常大的表格.我应该使用 sphinx(或其他搜索引擎)还是应该使用一些 MySQL 索引?

So, there is no text search, but I have a really big table. Should I use sphinx (or other search engine) or should I just use some MySQL indexes?

如果我使用sphinx,我肯定能很快获得结果;但也许刷新索引,即使使用增量索引,与 MySQL 索引也没有太大区别.同时,表中的变化不是必须的新插入,而是更新;我已经读过实时索引和增量索引可能会出现问题.

If I use sphinx, it's sure that I can obtain really fast results; but maybe having the index refreshed, even with delta indexing, doesn't make a big difference with MySQL indexing. At the same time, the changes in the table are not necessary new inserts, but updates; and I have read that real time indexing and delta index can give problems.

也许最好使用 MySQL 索引,并帮助进行某种缓存以避免不必要的查询.

Maybe it would be better to use MySQL indexes, and help with some kind of caching to avoid unnecessary queries .

推荐答案

只要使用 MySQL,你的工作绝对不需要 Sphinx.

Just use MySQL, you definitely don't need Sphinx for what you are doing.

这篇关于在无文本搜索查询中使用 sphinx 与 MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆