473,608 Members | 1,836 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JDBC Result closing takes ists time

Hi ,

i am reading 1000 Elements from a database (500.000 all together).
The problem is reading the data takes only a few miliseconds but
closing the ResultSet takes another 22 seconds. My Hard Disk tells me
that the ResultSet is probably running to the end of my table row by
row. Is there a way to tell mysql not to do this ?

Statement tempStmnt = aConnection.cre ateStatement();
tempStmnt = aConnection.cre ateStatement(
java.sql.Result Set.TYPE_FORWAR D_ONLY,
java.sql.Result Set.CONCUR_READ _ONLY);

tempStmnt.setFe tchSize(Integer .MIN_VALUE);

Date tempStart = new Date();
ResultSet tempRs = tempStmnt.execu teQuery("SELECT * FROM
ARTIKELSTAMMDAT EN");
int tempXx = 0;
while (tempRs.next() && tempXx++ < aCount) {
tempRs.getStrin g("artikelBezei chnung");
}

Regards Daniel Schneller
Jul 19 '05 #1
0 1216

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1159
by: Daniel Schneller | last post by:
Hi , i am reading 1000 Elements from a database (500.000 all together). The problem is reading the data takes only a few miliseconds but closing the ResultSet takes another 22 seconds. My Hard Disk tells me that the ResultSet is probably running to the end of my table row by row. Is there a way to tell mysql not to do this ? Statement tempStmnt = aConnection.createStatement(); tempStmnt = aConnection.createStatement(
1
2021
by: bogachkov | last post by:
Hello Joe Over the past several years, I have found your responses to jdbc usage/driver related issues to be extremely helpful. I am sure that you're very busy so I will make my question as brief as possible - the reason I didn't post this to a newsgroup is that I don't want to hear any more hype or links to benchmarks (since the vast majority of the benchmarks don't test concurent/mixed-transaction environments). (I am also posting a...
1
2689
by: tom.eeraerts | last post by:
Hello, I have a problem migrating an application from v5r2 to v5r3. The problem is with the prepared statements. To see what the problem is, i extracted a small piece of code and debugged the application while running it on my local window machine (IBM WSAD) but still connecting to the AS400. For the local debugging I use "com.ibm.as400.access.AS400JDBCDriver"
2
2342
by: kierandes | last post by:
Hi Guy, I am using a JDBC connection to retrieve data and populate datasets. Having some problems with errors: Error: java.sql.SQLException: Invalid cursor state // now we can get the connection from the DriverManager Connection con = DriverManager.getConnection(database ,"",""); //String searchPatients = G.PatientSearch.getText(); // We are connected, so lets create a statement to ask for...
0
8014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8504
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8489
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6019
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4043
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1614
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1349
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.