Solr将整个索引加载到内存中 [英] Solr loads entire index into memory

查看:1236
本文介绍了Solr将整个索引加载到内存中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用solr获取类似于
名称的数据:年龄:性别:balance:nextbalance:interest

I am using solr for data similar to name:age:sex:balance:nextbalance:interest

我有30 M记录总计达到4G磁盘。我按年龄检索:23只有50条记录。我在schema xml中有indexed =true。 Solr似乎将磁盘上的整个索引加载到内存(4G)中。它不应该只将40多条记录检索到内存中吗?

I have 30 M records totaling to 4G on disk. I am retrieving by age:23 which is only 50 records. I have indexed="true" in the schema xml. Solr seems to load the entire index on disk into memory (4G). Isnt it supposed to retrieve only the 40 odd records into memory ?

推荐答案

我认为这取决于你如何配置缓存(它在内存中的作用和内容)。无论查询如何,将整个索引加载到内存中都可以在检索结果所需的时间内提高性能。

I think it depends on how you configure the cache (what it does and doesn't keep in memory). Loading the entire index into memory can give you huge performance boosts in terms of the time needed to retrieve results, regardless of the query.

有关配置缓存的详细信息,以及表现因素:

Details on configuring cache, and details on performance factors:

  • http://wiki.apache.org/solr/SolrCaching
  • http://wiki.apache.org/solr/SolrPerformanceFactors

这篇关于Solr将整个索引加载到内存中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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