> Use a transaction or turn off read ahead. You are basically reading > ahead data, tossing the read-ahead information out, and then repeating. > > -dain
Thanks for your response. Sorry for my confusion, but I am. Your doc states to use <read-ahead> with the <strategy>on-load</strategy> for this exact case, but doesn't seem to make a difference at this point. You are saying strategy=none is the right thing to do? I tried that, too, which doesn't appear to make any difference. Please clarify this. There is a lot of contradictory info on the web about this. I also tried setting <read-ahead> in standardjaws.xml to true and false, neither of which seemed to make any difference. Seems no matter what I do, I get the same behavior, so I must be missing something. While I'm irritating you, can you explain exactly how or refer me to someplace that explains exactly how to use a transaction to speed up reading Collections. Thanks. I'm guessing I'm not the only one that needs to know about this. Frank Here is my ejb-jar.xml file in case it is of use to you: <?xml version="1.0" encoding="UTF-8"?> <ejb-jar> <description>Attribute Management</description> <display-name>Attribute Management</display-name> <enterprise-beans> <entity> <description>Attribute</description> <ejb-name>Attribute</ejb-name> <local-home>com.base2inc.bean.entity.attribute.AttributeHome</local-home> <local>com.base2inc.bean.entity.attribute.Attribute</local> <ejb-class>com.base2inc.bean.entity.attribute.AttributeBean</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>java.lang.Long</prim-key-class> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version> <cmp-field><field-name>id</field-name><jdbc-type>BIGINT</jdbc-type></cmp-fie ld> <cmp-field><field-name>containerId</field-name><jdbc-type>BIGINT</jdbc-type> </cmp-field> <cmp-field><field-name>containerType</field-name></cmp-field> <cmp-field><field-name>name</field-name></cmp-field> <cmp-field><field-name>value</field-name></cmp-field> <primkey-field>id</primkey-field> <read-ahead> <strategy>on-load</strategy> <limit>255</limit> <cache-size>1000</cache-size> </read-ahead> </entity> </enterprise-beans> <assembly-descriptor> <container-transaction> <method> <ejb-name>Attribute</ejb-name> <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> </ejb-jar> Frank Morton wrote: > > > Using 3.0.0RC1 with PostgreSQL underneath. Just converted > > to using a Local Interface, but didn't make as much performance > > difference as I hoped. > > > > I have a case where I need to iterate a Collection resulting from > > a finder method with an entity bean. Since the collection might have > > 200 items, performance is very bad iterating the Collection. > > (I do have an index on the field used for finding). > > > > Using a Collection in the first place is what I would like to do > > since some of the elements require an update. But, since I > > know I will be looking at each item in the Collection, is there > > some way to fetch the content of the collection as a group > > prior to iterating instead of getting killed by the performance > > of fetching one at a time? > > > > TIA. > > > > > > _______________________________________________ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user