>>>Do you know how R.O. affects SCAN WHILE? I often use a SEEK < parent key>, followed by a SCAN WHILE < still on same parent key >.
>>>
>>
>>There's no R.O. is involved in this case because WHILE clause is not R.O. optimizable.
>
>I see. This sort of confirms my suspicions that this approach (SEEK, followed by SCAN WHILE) would be much faster than a SCAN FOR. (As long as it is not combined with a filter, or with a FOR clause.)
>
>Hilmar.
Not necessarily true. About a month ago there was a similar discussion and I ran some tests, confirming that SCAN FOR was faster. I will try to find this thread. So, basically it depends on lots of different factors...
Re: Counting Child Records Thread #
653805 Message #
653819
If it's not broken, fix it until it is.
My Blog