我有5000个事件和38个Dnode,Relate很轻,我的SQL脚本是这样的:
SELECT COUNT(DISTINCT(tnode.aaa)) as abc from (MATCH {class: Dnode, as: snode, where:(name = 'uuid' and value='d8a30901a12d42a17e9050279aebccd2')}.in('Relate'){as: event, where:(ts >= 1509270057 and ts <= 1524822057)}.out('Relate'){ as: tnode, where:(name = 'haddr')} RETURN tnode )
在1.308秒执行,我如何优化我的查询