Index Quiz! Extra Credit Answer

The original query:
  for each customer where 
customer.region <> "WEST" and
customer.active = yes and
customer.balance > 10000:
This doesn't use Idx1 because the region field is not an equality match. OK, let's make it an equality match:
  for each customer where
customer.region = {all the regions except WEST}
customer.active = yes and
customer.balance > 10000:
How can we make something be "{all the regions except WEST}"? Well, Region is an important enough (and variable enough) datum that it's reasonable to assume that there's a separate table listing them. And since we know that the Region field in the Customer index Idx1 is in ascending alphabetical order, we know how to retrieve the Region records to maintain the same final result:
  for each region where region.name <> "WEST" by name:
for each customer where customer.region = region.name and
customer.active = yes and
customer.balance > 10000:
Presto! Only reading exactly the records we want. This is a very common technique and is easy to do if there is already a table for what we need.

How does this apply to things we might not have a table for? The important point is to be able to cycle through the possibilities. With a logical value such as you have in query #3 ... remember query 3?
  for each customer where
customer.region = "MEX" and
customer.balance > 10000:
You might try something like this:
  do i = 1 to 3:
matchvar = (if i = 3 then ? else (i = 2)).
/* Follow that statement? Matchvar is no if i=1, yes if i=2, and ? if i=3 */
for each customer where
customer.region = "MEX" and
customer.active = matchvar and
customer.balance > 10000:
If the missing field is a date or an integer, you may have a range of valid values; set up a loop with DO or REPEAT to cover the range.  If the missing field is one of a series of possibilities for which there is no table but you have (or can generate) a delimited list, go through the entries:
  def var possibles as char init "MEX,WEST,EAST,ASIA,...".
  def var i as int.
  do i = 1 to num-entries(possibles):
    for each customer where 
      customer.region = entry(i, possibles) and
      customer.active = yes  ...

So is this worth it?  Is it worth the trouble to write this extra code to cut down on a few record reads?  Well, the
answer is, as always, "It depends."  How many records are you going to eliminate from the result set?  In the top query, if you know that the Western region is very small, maybe it's not -- if you never expect the record count associated with that region to grow.  In the later case, it depends what proportion of Mexican records have balances over 10,000.  If that's most of the records, maybe it doesn't.  But your code won't scale.  If your company grows, this code will be an anchor dragging performance down until you eventually have to go through your entire application finding these little gotchas -- and who has time for that?