> Here's a long shot. What if you remove the index from the dept field in the > database, then add it back? Maybe there's a priority order set in the order > they are stored in the structure file.
I can give that a go, but I agree it's probably a long shot. R:Base's query optimizer seems to be looking at the randomness of the indexes and making a decision based on that -- a decision that, in some cases, is probably the correct one. In this case, however, I want to control the index use myself. I have a short-term workaround using WHERE INT(CTXT(Dept)) IN (32) which, of course, makes it impossible for R:Base to consider the Dept for use in the query. I think I will post an enhancement request for a SET QUERYOPT OFF setting to force R:Base to use the first available index in the WHERE clause, reading from left to right. -- Larry
