JDBC batch query for high performance <p>I want to do batch query DB for high performance, example sql to query based on different customer_id:</p> <pre><code>select order_id, cost from customer c join order o using(id) where c.id = ... order by </code></pre> <p>I'm not sure how to do it using JDBC statement. I know I can use stored procedure for this purpose, but it's much better if I can just write sql in Java app instead of SP. <br /> I'm using DBCP for my Java client and MySQL DB.</p>