On Wed, Feb 10, 2010 at 6:25 PM, Paul InterlockInfo
<[email protected]>wrote:

> And if I could ask (this is a RBase sql I think),  what advantage would
> there be in opting to avoid using a index?  I always assumed if it is
> indexed then RBase would use the index and if not, well it wouldn’t.  But
> would there be a reason to avoid the index?
>
> Paul,

You would rarely opt to avoid using an index. The rare circumstance would be
a query with many conditions in the WHERE clause, and where R:BASE's query
optimizer was not automatically picking the best index. You can force it to
go on to what it would consider the second-best index by putting the first
value (not the whole condition, but the value) in parentheses.

I have used this with multi-table queries (more than 5 tables), with MANOPT
ON, as part of my way of forcing R:BASE to pick my favorite indexes rather
than it's own favorites. I think there were some changes in the query
optimizer math results between 7.6 and 8.0 or 9.0 (32) and 9.0 (64), because
I had to rewrite just a few queries to get back to speedy results.

Bill

Reply via email to