views:

225

answers:

1

I have a SQL query running using something like this:

PreparedStatement pstmt = dbConn.prepareStatement(sqlQuery);
ResultSet rs = null;
..
.. Set parms here ..
..
rs = pstmt.executeQuery();

It works fine when I use a local database, but I have to test on this remote one since it has a lot more data. But since it's remote, it is taking forever.

I was curious if there was a way to get the status or how many rows had been queried after a certain time. Just to be able to see that stuff was actually working and I wasn't wasting my time watching pixels. You know, something like 'Ok so far we got 300 rows, getting another 400'. Does something like that even exist?

+1  A: 

I figured out that this wasn't possible, at least in any easy way. I found that that I should probably split up the query instead and not get hundreds of thousands of results at a time, but rather just 50 or a hundred.

Steven Wright