The driver does not compile any sql. The database does. Your query will get compiled at first use. The advantage of PreparedStatement is, that your database knows you're using the same query the second time, even when you use different values for your parameters. If you use a Statement, Oracle will compile the query again if you change the where clause ...