Try turning auto-commit off:
// make sure autocommit is off
connection.setAutoCommit(false);
st = connection.createStatement();
st.setFetchSize(1000);
System.out.println("start query ");
rs = st.executeQuery(queryString);
System.out.println("done query");
More Related Contents:
- Is it possible to specify the schema when connecting to postgres with JDBC?
- How to get a value from the last inserted row? [duplicate]
- org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
- What is the most recommended way to store time in PostgreSQL using Java?
- How to read all rows from huge table?
- Driver JDBC PostgreSQL with Android [duplicate]
- How do I use PostgreSQL JSON(B) operators containing a question mark “?” via JDBC
- how to copy data from file to PostgreSQL using JDBC?
- Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
- Convert a Result Set from SQL Array to Array of Strings
- Postgres UUID JDBC not working
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- Show JDBC ResultSet in HTML in JSP page using MVC and DAO pattern
- Solving a “communications link failure” with JDBC and MySQL [duplicate]
- How to establish a connection pool in JDBC?
- JDBC Class.forName vs DriverManager.registerDriver
- what is @JoinColumn and how it is used in Hibernate
- Why does autoReconnect=true not seem to work?
- How does Class.forName() work?
- JDBC returning MySQLSyntaxError Exception with correct statement
- Adding jdbc driver to classpath
- JDBC SQLServerException: “This driver is not configured for integrated authentication.”
- ojdbc14.jar vs. ojdbc6.jar
- Connect To SQL Server With Windows Authentication From A Linux Machine Through JDBC
- Connection cannot be cast to oracle.jdbc.OracleConnection
- NoClassDefFoundError sun/io/ByteToCharConverter with InterBase JDBC driver
- Why do we use a DataSource instead of a DriverManager?
- Do I need to close ‘PreparedStatement’? [closed]
- Database independence through JDBC in java
- java.sql.SQLException: No database selected – why?