I did not ready the beginning of this thread, but with the whileopt setting,
you can turn off the optimizer.  I don't recommend this.

To keep R:base from using an index on a field, you can put parens around the
field and then it will be treated as an expression and the index will not be
used.

Example:

Select * from table1 t1, table2 t2 where
T1.c1 = t2.c1 and t1.c2 = t2.c2

Lets say c2 is a yes/no field and has an index and R:base for some reason
decides it wants to use the index on c2 instead of an index on c1, I can do
this:

Select * from table1 t1, table2 t2 where
T1.c1 = t2.c1 and (t1.c2) = (t2.c2)

Troy



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence
Lustig
Sent: Wednesday, September 15, 2004 7:42 AM
To: RBG7-L Mailing List
Subject: [RBG7-L] - RE: Help me de-optimize this query (calling Bill
Downall!)

> Could it be a good idea to swap the 2 clauses of AND?

R:Base makes the decision of which index to use based on it's internal
analysis
of the "quality" of the index, without looking at placement in the R:
prompt. 
I did try moving the clauses around, with no effect.
--
Larry

Reply via email to