1. A method of rewriting a Structure Query Language (SQL) statement in order to prevent processing of a join between a master table and a detail table in a database, the join having a join condition, the method comprising the steps of: a. determining in the SQL statement a unique identifier to a row of the master table; b. equating the unique identifier to an identifier to related rows of the detail table using the join condition; c. producing a revised SQL statement that only refers to the detail table using the identifier to the at least one row of the detail table; and, d. processing the revised SQL statement.