Accessing from command prompt is always fast in my opinion. you can get better performance form JDBC by using PreparedStatement, in case if you are not using already, doing batch inserts or update ,...