tags:

views:

32

answers:

1

Hi Lately i have been having some trouble with connecting to mysql from java. Mostly everything works fine. But sometimes, the query takes forever, it is a pretty hard query and it should take about 10s. But it takes minutes without java recieveing the result from mysql. When i look in the processlist of mysql, it is sending data and blocking al other queries on that table. It continues after the 180s i have set in querytimeout, and even after i kill the javaprocess, the query in mysql is running and i have to kill that aswell.

A: 

You can't do anything meaningful with that much data.

If the data is meant to be displayed consider implementing paging. Otherwise, if it's for computational purposes then maybe it should be done in some stored procedure/function. Nobody likes them, but they can be really useful for optimizations.

Boris Pavlović
I can do something usefull with it, but thats besides the point. Its not that much data im extracting (total about 1M rows). But its not that its much data tro transfer that is the problem, even with a limit on 100, it takes ages. Mostly it is less then 10s as stated earlier, but sometimes, minutes without any response (after the query is done according to mysql)
Mikael Sundberg