Query Plan:

Relative cost = 21418093

Read master map SQLUser.RecordsMASTER, looping on id and ~{330}*10(qw).

For each row:

 Read master map SQLUser.Orders.Orders, using the given idkey value.
 Read master map SQLUser.OrderedBooksMASTER, using the given idkey value.
 Read master map SQLUser.BooksMASTER, using the given idkey value.
 Read master map SQLUser.OrderedRecordsMASTER, using the given idkey value.
 Output the row.

Index is on property qw and not on er

Query Plan:

Relative cost = 21418093

Read master map SQLUser.RecordsMASTER, looping on id and ~{330}*10(qw).

For each row:

 Read master map SQLUser.Orders.Orders, using the given idkey value.
 Read master map SQLUser.OrderedBooksMASTER, using the given idkey value.
 Read master map SQLUser.BooksMASTER, using the given idkey value.
 Read master map SQLUser.OrderedRecordsMASTER, using the given idkey value.
 Output the row.

Index is on property qw and not on er

Query Plan:

Relative cost = 21418093

Read master map SQLUser.RecordsMASTER, looping on id and ~{330}*10(qw).

For each row:

 Read master map SQLUser.Orders.Orders, using the given idkey value.
 Read master map SQLUser.OrderedBooksMASTER, using the given idkey value.
 Read master map SQLUser.BooksMASTER, using the given idkey value.
 Read master map SQLUser.OrderedRecordsMASTER, using the given idkey value.
 Output the row.

Index is on property qw and not on er

I tried to %Buildindices but it failed. Display Error method shows [Method not implemented].

##class(User.School).RollNoMarksExists(RollNo, Marks)

##class(User.School).RollNoMarksOpen(RollNo, Marks, , .sc)

I tried this above method but it is showing the below error.

Error #5002: Cache Error : <COMMAND>%Open+18^Library.Persistent.1

What does this mean??

I tried to %Buildindices but it failed. Display Error method shows [Method not implemented].

##class(User.School).RollNoMarksExists(RollNo, Marks)

##class(User.School).RollNoMarksOpen(RollNo, Marks, , .sc)

I tried this above method but it is showing the below error.

Error #5002: Cache Error : <COMMAND>%Open+18^Library.Persistent.1

What does this mean??

Thanks for the reply. This is only for the date i guess not timestamp, is there any direct command for this.

 But Now i want this way

I want the data between (2019-3-09 07:00:00.00 to 2019-3-09 10:00:00.00)

if task run at 10:00 am ( i will set End time : 2019-03-09 10:00:00 (with the help of above 3 commands) but how to set the start time which i need of 2019-03-09 07:00:00 means i have to go 3 hours before of current timestamp).

Also my property is type of %Timestamp only . Which command i can use to subtract the currenttimestamp with 3 hours .