Marc,

Try forcing R:BASE to use a particular index, by putting the values to the
right of the equal signs of the other conditions in parentheses. e.g.,
change the WHERE clause successively to these, and time the results:

-- make it use the index on date
... tr_date BETWEEN 1/1/09 AND .#date AND insco1 = (7) AND compnum =
(insco1)
-- make it use the index on insco1
-- quotation marks around the date prevent R:BASE from doing division
... tr_date BETWEEN ('1/1/09') AND (.#date) AND insco1 = 7 AND compnum =
(insco1)

(Since compnum and insco1 are both columns in your view, R:BASE has already
done whatever it will with the comparison of those two indices before you
get to this WHERE clause.)

If those tests have no difference, then you may need to rebuild your view
definition to optimize retrieval. Your 6-table view must be complex enough
that the R:BASE query optimizer cannot figure out the best way to get the
data.

Bill

On Tue, May 5, 2009 at 10:25 AM, MDRD <[email protected]> wrote:

>
>  The command below takes 2 times longer in V8 compared to the same code in
> 7.5.
>  PRINT  NewForm76D  WHERE tr_date BETWEEN 1/1/09 AND .#date AND insco1 =
> 7
> AND compnum = insco1 ORDER BY insco1, custnum, tr_date
>
> The report is based on a 6 tab view,  Browse all from View using the same
> where clause only
> takes 1/4 the time compared to the Print statement.  Leaving off the Order
> by does not make
> any difference.
>
> I am using a copy of the same DB converted to V8, so all data, reports and
> indexes are the same.
>
>  I did notice that the #1 file was 46 k now it is 191 k and the # 3 file
> is almost double the
> size in V8.   Is that normal?
>
> I am not sure what to look for next?
>
> Thanks
> Marc
>
>

Reply via email to