AnsweredAssumed Answered

Constrain found set doesn't work as anticipated

Question asked by amsc on Nov 6, 2017
Latest reply on Nov 7, 2017 by amsc

I have a report that ties many components of our system together.  I'm now addressing performance issues with it.  Once I put timers in all of the major processes, I found that the step that takes the longest was a bit surprising as I thought that would be one of the quicker steps. 


In this particular step, I'm looking for orders that are not setup for delivery.  The relationship is as follows:


Orders_custnum -- delivery_custnum

orders_date -- delivery_date


The find I'm doing is in the orders table and is as follows:


Enter find mode

set field orders_date = $range

new record

set field delivery_date = "==*"

omit record

perform find


The script above works quite find, but takes quite a long time.  All fields in this search are indexed.  Because this step is truly to identify the exceptions, I decided to try and switch this from a omit step to a constrain found set to see if it would speed up the process any.


Enter find mode

set field orders_date = $range

perform find

enter find mode

set field delivery_date = "=="

constrain found set


This script doesn't work.  It doesn't give any results.  I'm curious as to why this doesn't work.  I'm trying to identify records in the orders table that don't have a corresponding record in the delivery table.  Thoughts?


On speed, I'm going to address that with a different approach to minimize the times I cycle through the data.