rzr
Member
Is it a better programming practice to do a CAN-FIND(Table...) and then FIND Table if record exists?
Does this improve performance and/or decrease db read operations?
I have a simple code that does a FOR EACH (the query is correctly indexed) and create a temp-table. Within this FOR EACH there are ton's of FIND statements which when available will update some fields of a temp-table. I'm curious to know if I do a CND-FIND before the actual FIND then will it improve performance.
Code:
IF CAN-FIND(FIRST Customer WHERE Customer.CustNum =1 ) THEN
FIRST Customer WHERE Customer.CustNum =1 NO-LOCK NO-ERROR.
Does this improve performance and/or decrease db read operations?
I have a simple code that does a FOR EACH (the query is correctly indexed) and create a temp-table. Within this FOR EACH there are ton's of FIND statements which when available will update some fields of a temp-table. I'm curious to know if I do a CND-FIND before the actual FIND then will it improve performance.