根据列表接收字符串RID类MARKS

时间:2015-05-14 14:28:21

标签: orientdb

在我的数据库IM_0609中,OrientDB版本2.0.8是MARKS类:

CALIBRATION_DATE:date.
DEVICE_MARK:string
DEVICE_NAME:string
END_MARK_NUM:decimal
MARK_NUM:decimal
PERIOD:decimal
SERIAL_NUM:string

在MARKS班级,我创建了索引如下:MARKS上的CREATE INDEX IDX_MARK_NUM(MARK_NUM)NOTUNIQUE

我快速运行以下查询:

select rid from index:IDX_MARK_NUM where key>=74118499 and key<=74118501

结果查询:

#12:281829
#12:493194
#12:422739
#12:211374
#12:70464
#12:9
#12:352284
#12:140919
#12:329563
#12:259112

问题:如何编写查询以获取列表RID字段类MARS?

1 个答案:

答案 0 :(得分:0)

select * 
from MARKS 
where @rid in [select rid 
               from index:IDX_MARK_NUM 
               where key>=74118499 and key<=74118501] 

跑51秒。