I am using JDBC to query a database for a list of rows, wich can be as many as 80k or more in a single RecordSet.
Currently I create an statement, execute the query (I cannot use prepared statements as there's IN clausules with different number of parameters each of the 6 iterations), and then manage the data.
The thing is the query executes veeery slowly, and it's much slower than PHP for example so I know it's not a mysql problem. We're talking orders of magnitude slower. The java version I am running it now it's a 1.4.2 for linux, but I can change it and will probably end up running on a 5.0, if it's worth running the app at all.
Any way to optimize this?