Hi all
I'm currently working on a query taking a long time on site. I’m just wondering if anyone could point me in the right direction for documentation on query efficiently. As its a bit of a dark art for me. I’m currently working on open edge 10.2 b.
There isn’t currently an index that fits the queries criteria. Is there any point i using index if all the criteria doesn’t use it? any other suggestions for speeding it up would be help
for each sophdr where
sophdr.compNo = syscon.compno and
sophdr.ordAck = true and
sophdr.ordstat = "N":u and
sophdr.ordNum >= syscon.sordno and
sophdr.ordNum <= syscon.sordno-max
use-index main2 /*index doesnt have ordnum in*/
no-lock
break by sophdr.custslno descending
by sophdr.ordnum descending:
I'm currently working on a query taking a long time on site. I’m just wondering if anyone could point me in the right direction for documentation on query efficiently. As its a bit of a dark art for me. I’m currently working on open edge 10.2 b.
There isn’t currently an index that fits the queries criteria. Is there any point i using index if all the criteria doesn’t use it? any other suggestions for speeding it up would be help
for each sophdr where
sophdr.compNo = syscon.compno and
sophdr.ordAck = true and
sophdr.ordstat = "N":u and
sophdr.ordNum >= syscon.sordno and
sophdr.ordNum <= syscon.sordno-max
use-index main2 /*index doesnt have ordnum in*/
no-lock
break by sophdr.custslno descending
by sophdr.ordnum descending: