根据列表接收字符串 RID class MARKS
According to the list to receive a string RID class MARKS
在我的数据库中IM_0609 OrientDB version 2.0.8 is a class MARKS:
CALIBRATION_DATE:date.
DEVICE_MARK:string
DEVICE_NAME:string
END_MARK_NUM:decimal
MARK_NUM:decimal
PERIOD:decimal
SERIAL_NUM:string
在 class MARKS 中,我创建了如下索引:CREATE INDEX IDX_MARK_NUM on MARKS(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 字段 class MARS?
select *
from MARKS
where @rid in [select rid
from index:IDX_MARK_NUM
where key>=74118499 and key<=74118501]
运行 持续 51 秒。
在我的数据库中IM_0609 OrientDB version 2.0.8 is a class MARKS:
CALIBRATION_DATE:date.
DEVICE_MARK:string
DEVICE_NAME:string
END_MARK_NUM:decimal
MARK_NUM:decimal
PERIOD:decimal
SERIAL_NUM:string
在 class MARKS 中,我创建了如下索引:CREATE INDEX IDX_MARK_NUM on MARKS(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 字段 class MARS?
select *
from MARKS
where @rid in [select rid
from index:IDX_MARK_NUM
where key>=74118499 and key<=74118501]
运行 持续 51 秒。