How to increase the speed of searching in a large database?
- From: "Ting" <raedomn@xxxxxxxxx>
- Date: 29 Mar 2007 07:49:25 -0700
Hi all,
I have a very big database that contains one million rows in it. After
an SQL command is executed and the results are assigned to a ResultSet
variable, it takes a long time to print the result out. My code looks
like something similar to this:
ResultSet rs = stmt.executeQuery(query);
while (rs.next()) {
System.out.println(rs.getString(1));
}
And this would take nearly one minute to print the resultset out.
Is there anyway that I can make it faster?
Thanks!
Ting
.
- Follow-Ups:
- Re: How to increase the speed of searching in a large database?
- From: joeNOSPAM@xxxxxxx
- Re: How to increase the speed of searching in a large database?
- Prev by Date: Hibernate - Initial SessionFactory creation failed
- Next by Date: Re: How to increase the speed of searching in a large database?
- Previous by thread: Hibernate - Initial SessionFactory creation failed
- Next by thread: Re: How to increase the speed of searching in a large database?
- Index(es):