neo4j索引相关问题
发布于 7 年前 作者 lxtxycl 3295 次浏览 来自 问答

使用 create index on : People(name) 语句创建的索引,在查询时 使用 match (n {name:‘测试’}}) return n 或者 match (n) where n.name=‘测试’ return n 查询事实证明索引没起作用,查询还是遍历全图 而教程说加上label 如match (n:People {name:‘测试’}}) return n 或者 match (n:People) where n.name=‘测试’ return n 查询使用了索引但是我感觉还是没用到索引,只是利用了label过滤

3 回复

另外还有个问题neo4j 3.0版本还支持legeacy index 么,我在neo4j.conf里加了如下自动索引配置好像没起作用 node_auto_indexing=true

The node property keys to be auto-indexed, if enabled.

node_keys_indexable=CCRQ,CC,FZ,CX,DZ,PH,type,ZW

Enable auto-indexing for relationships, default is false.

relationship_auto_indexing=true

The relationship property keys to be auto-indexed, if enabled.

relationship_keys_indexable=type

请问关于neo4j的索引问题你现在搞清楚了吗?我最近刚刚开始看这个,对索引的问题也有很多疑问,可以请教你一下吗?

不要感觉啊,使用profile 对比查看下有无索引的运行效率,命令如 profile match (n {name:‘测试’}}) return n

回到顶部