Hi experts , I am right now running on project that needs to retrieve big resultset from database . Actually I am using mysql database for my project and java as my programmong language where I
make my quries there. My problem is that when I retrieve information from database in java (As a result set) then I make some filtering/examining data on the result set , it takes too much time for program to examine ( record after record ). Therefore , what I am thinking is to make a programming query (already it has final result set , no need to do further process on it ) , so it will be only launch that query and
get the result( because executing query and retrieve it from database takes much faster time )
I have already searched about that , I got only way is through stored procedure . however stored procedure has less capablities to perform such programming process like to store a result set in
a temporary variable , etc...
It sounds like you need to filter results in the query itself, however there is a lot you can do with a stored proc...if you really need to.
Stored procs can take parameters. I've not too much experience with mySQL, but Oracle stored procs are really powerful.
Stored procedures have variables/intermediate result sets too. Anything that can be done in a where clause should rather than filtering after though because it gives the database less work/processing/IO.