Query optimization is the process of choosing the most efficient way to execute a Structured Query Language (SQL) statement, while query optimizer is a tool in Relational DataBase Management System (RDBMS) that carries out the process of optimizing a query. In this paper, four different RDBMS were considered namely Microsoft SQL 2010 server, Oracle 11g release 2, MySQL 5.6 and Microsoft Access 2010. For the purpose of testing four different data sets were used. The data was run using each data set (1 310 116, 1 047 999, 750 000, 500 000, 250 000 and 125 000). It was discovered that adding more memory to the system shows improved performance of the RDBMS query optimizer.