posted 17 years ago
A prepared statement is useful when you want to send a similiar query to the database engine where the query is the same except that there are different parameters. Here, it sounds like you have one query that is run in which case I don't think that a prepared statement would help.
What do you do with the 45,000 records?
What about a stored procedure which runs on the server-side? This would keep the records from having to come across to the client-side.
If you're viewing the records in a JTable, there's the ResultSetTableModel. I believe that a ResultSetTableModel just brings across the records as necessary to be viewed a screenful at-a-time.
Would it help to use a LIMIT clause and bring the records over, let's say 100 at-a-time? Only as needed.
Kaydell