When a RAGS generated statement caused an error, the debugging process was difficult if the statement was complex ... To simplify a statement, RAGS walks a parse tree of the statement and tries to remove terms in expressions and certain clauses (Where and Having). This simplification algorithm was found to be very effective
Google-1
Google-2
By permission of the Very Large Database Endowment