Patches item #581134, was opened at 2002-07-14 00:09
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=581134&group_id=22866

Category: JBossCMP
Group: v3.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Georg Schmid (giorgio42)
Assigned to: Nobody/Anonymous (nobody)
Summary: CMP Performance Patch: call setFetchSize

Initial Comment:

CMP Performance Patch: call setFetchSize() on 
PreparedStatement

I added the new element <fetch-size> to the elements 
<defaults> and <entity> in jbosscmp-jdbc.xml as well 
as to JDBCEntityMetaData and
the JDBCEntityBridge. 

setFetchSize() is a standard method at least for 
Statement and PreparedStatement since JDBC2.0.

In JDBCAbstractQueryCommand, 
JDBCLoadEntityCommand and 
JDBCLoadRelationCommand this value
is used in a call to setFetchSize() on the 
PreparedStatement used to retrieve the rows
from the database just after the statement has been 
created.

The value controls the number of rows that are fetched 
from the database in each roundtrip.

It may make sense to set the fetch size in other 
commands, too, but I don't know enough about the 
JBossQL related commands to be sure.

The effects on performance for a simple finder on a table 
with 8 attributes on Win2K, Oracle8.1.7 thin driver is:
fetch size    time in milliseconds to get 6000 entries
   1           6100
  10           1500 (this is the Oracle thin client drivers 
default setting)
 100           1150
5000           1100

Database and JBoss are running on the same system in 
this setup.

The higher the network latency the greater the benefits 
on the read performance will be.
In another setting where the DB server is on the lan 
several thousand kilometers away changing the fetch 
size from 10 to 1000
reduces the time to fetch 1500 rows from 20 to 2 
seconds (and 0.5 seconds on the fourth repetition).

The patch has been written against 3.1.0alpha.
(the metadata related parts are just copied and modified 
from the listCacheMax implementation).

Best regards
Georg





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=581134&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to