Probably I'm too late, but ...
Try this:
sele daynum, time, start ;
from i_sched ;
where ;
stop = {} or stop - (daynum-1) >= ldDate ;
and start - (daynum-1) <= ldDate ;
into cursor TempISched
the needed index at this point are the following:
stop
stop - (daynum-1)
start - (daynum-1)
Gianni
On Mon, 3 Mar 2008 10:32:24 -0500, "Tracy Pearson" <[EMAIL PROTECTED]> wrote:
>I suspect the calculation in the WHERE clause is the reason.
>
>Tracy
>
>-----Original Message-----
>From: MB Software Solutions General Account
>Sent: Monday, March 03, 2008 10:26 AM
>
>Running SYS(3054,11,"lcOpt") says this query is not optimizable, yet there's
>an index on both start and stop fields:
>
>sele daynum, time, start ;
> from i_sched ;
> where empty(stop) or stop >= ldDate + (daynum-1);
> and start <= ldDate + (daynum-1);
> into cursor TempISched
>
>
>ldDate is a local date variable. Sys(3054) reports this: "Rushmore
>optimization level for table i_sched: none"
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.