Network results
Ping statistics for *.*.*.*:
Packets: Sent = 140, Received = 140, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Query Analyzer returns 85 rows in 0 seconds. I modified it to only
return Name and ID and it still runs slow. So it cant be row size,
network latency, hardware should be ruled out by the fact that it runs
super fast through query analyzer, and PHP and ASP.NET. Its only when I
write the code in JSP for Tomcat that it slows down.
Charles
-----Original Message-----
From: Allistair Crossley [mailto:Allistair.Crossley@(protected)]
Sent: Monday, February 07, 2005 11:37 AM
To: Tomcat Users List
Subject: RE: JTDS help
Hi,
There's no real reason relating to Tomcat or jTDS that this would run
slow. You are more likely to find answers with your hardware, network
latency, database load or row size and other environmental factors.
Allistair.
> -----Original Message-----
> From: Charles P. Killmer [mailto:charlesk@(protected)]
> Sent: 07 February 2005 17:34
> To: Tomcat Users List
> Subject: JTDS help
>
>
> I am trying to get Tomcat talking to my database quickly. This code
> takes about 2-3 seconds to load. Anyone got any idea's why?
> Or if you
> run this in your environment, how well does it run?
>
> <%@(protected).*"%>
> <%
> Connection conn =
> DriverManager.getConnection("jdbc:jtds:sqlserver://*.*.*.*:143
> 3/dbname;u
> ser=******;password=*******");
>
> Statement stmt = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,
> ResultSet.CONCUR_READ_ONLY);
> ResultSet rs;
>
> rs = stmt.executeQuery("SELECT * FROM accounts");
>
> out.println("<table>");
> String name;
> String ID;
> while (rs.next()) {
> name = rs.getString("Name");
> ID = rs.getString("ID");
> out.println("<tr><td>" + ID + "</td><td>"+name+"</td></tr>" );
> }
>
> out.println( "</table>" );
>
> conn.close();
> %>
>
> This is just a JSP script, nothing is compiled. I know it is
> better to
> compile, but I am trying to chase down this DB slowness first.
>
> Charles Killmer
> Netgain Technology
> CharlesK@(protected)
> Office: (320) 251-4700 ext 107
>
>
<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE>
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)