1. A method of modifying a Structured Query Language (SQL) statement in order to reduce the number of joins executed by a database, the method comprising: a) presenting the SQL statement to the database; b) identifying removable joins between a view and one of its base tables in the SQL statement, wherein the view and the one of its base tables are included in the FROM clause of the SQL statement, wherein a join is removable when a join condition is an equality between unique keys having no NULL values in the one of its base tables; c) when primary key information is not accessible, identifying removable joins in the SQL statement based on following criteria: (i) the join condition is a simple equality between any column in the two instances of a table; and (ii) the join is mergeable, wherein the join is mergeable if a user settable metadata property is set to indicate that the join is a candidate for table merging; d) for each identified join, modifying the SQL statement so as to remove the identified join and to change references to a first instance of the one of its base tables which is referred to by the identified join to a second instance of the one of its base tables.
1. A method of modifying a Structured Query Language (SQL) statement in order to reduce the number of joins executed by a database, the method comprising: a) presenting the SQL statement to the database; b) identifying removable joins between a view and one of its base tables in the SQL statement, wherein the view and the one of its base tables are included in the FROM clause of the SQL statement, wherein a join is removable when a join condition is an equality between unique keys having no NULL values in the one of its base tables; c) when primary key information is not accessible, identifying removable joins in the SQL statement based on following criteria: (i) the join condition is a simple equality between any column in the two instances of a table; and (ii) the join is mergeable, wherein the join is mergeable if a user settable metadata property is set to indicate that the join is a candidate for table merging; d) for each identified join, modifying the SQL statement so as to remove the identified join and to change references to a first instance of the one of its base tables which is referred to by the identified join to a second instance of the one of its base tables. 2. The method according to claim 1 , wherein the unique keys having no NULL values are primary keys.