简体   繁体   English

Solr用于索引一个表VS常规MySQL innoDB表缓冲区

[英]Solr for indexing one table VS regular MySQL innoDB table buffer

I'm planning to use Solr for search over one mysql table, this table should have a millions of records. 我打算使用Solr在一个mysql表上进行搜索,该表应具有数百万条记录。 i Did normalised this table so it can be indexed and searched by solr for more performance results. 我是否对该表进行了归一化,以便可以由solr对其进行索引和搜索以获取更多性能结果。

Is this right or it should be searching with mysql table it self, i mean normal select. 这是正确的还是应该使用自己的mysql表进行搜索,我的意思是正常选择。

please advice which is better since it's just one table to be indexed and searched. 请提出更好的建议,因为它只是一个要索引和搜索的表。

Thanks 谢谢

If your requirement is to "search" only one MySQL table using regular SQL SELECT statements, then Apache Solr seems a bit roundabout and overkill. 如果您的要求是使用常规SQL SELECT语句仅“搜索”一个MySQL表,那么Apache Solr似乎有点round回和过大。

With solr, you'd need to periodically import data from the MySQL table into the solr schema, which essentially means you'll be maintaining two copies of the data. 使用solr,您需要定期将MySQL表中的数据导入solr模式,这实质上意味着您将维护数据的两个副本。 So there's also a delay between the time data is changed in the MySQL table and when the solr schema is refreshed from the database. 因此,在MySQL表中更改数据的时间与从数据库刷新solr模式之间的时间之间也存在延迟。

Aside from that, as far as performance, I'd expect that solr would be nearly as fast searching its schema as MySQL would be at searching it's own table. 除此之外,就性能而言,我希望solr几乎可以像MySQL搜索自己的表一样快地搜索其模式。 But you'd really need to test that, to make that determination for your particular requirements. 但是您确实需要进行测试,以便根据您的特定要求做出决定。


You'd likely want to make use of the solr "delta import", specifying appropriate queries to identify rows in the MySQL table that have been inserted and updated since the last import. 您可能想利用solr“增量导入”,指定适当的查询来标识MySQL表中自上次导入以来已插入和更新的行。

If this is the only usage of the MySQL table, then the only indexes you would really need on the MySQL table, as far as solr search/import performance is concerned, would be those indexes needed to optimize the performance of the two "delta import" queries. 如果这是MySQL表的唯一用法,那么就Solr搜索/导入性能而言,您真正需要在MySQL表上的唯一索引就是优化两个“增量导入”性能所需的那些索引。 ”查询。

Try using 3rd party search service like www.rockitsearch.com . 尝试使用第三方搜索服务,例如www.rockitsearch.com。 It is an out of the box search solution. 这是开箱即用的搜索解决方案。 No need to worry about maintenance of solr cluster. 无需担心solr集群的维护。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM