Hi,
we use
<sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
<attribute attribute-name="grabSize" attribute-value="10"/>
</sequence-manager>
in the <connection-pool> decription in repository_database.xml
Maybe this can help you.
Regards.
Max
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 24. M�rz 2003 17:52
> An: [EMAIL PROTECTED]
> Betreff: A smart way to set maximum number of records returned by a
> Query (ORACLE)
>
>
> Hi,
>
> Can someone explain me what the Query.setStartAtIndex() and
> Query.setEndAtIndex() are actually doing ?
> From what i have picked up, it is not intented to be used
> when you want to
> prevent the DB engine from retrieving huge numbers of results.
>
> I have tables that can contain hundreds of thousands of records.
> When a user select no search criteria in my query interface,
> I would like
> to prevent OJB from creating huge number of Objects (to save
> memory and
> time !).
> I would rather like to be able to set a maximum size for the returned
> Collection.
>
> The only trick I found is to add to my Query a SQL criteria
> like this :
>
> Criteria crit = new Criteria();
> crit.addSql("rownum < 100");
> Query q = QueryFactory.newQuery(Foo.class, crit);
> Collection c = broker.getCollectionByQuery(q);
>
> Ok, it is not very smart and works only for Oracle...
> Anybody has a better idea or could tell me if that is doable with
> Query.setStartAtIndex() and Query.setEndAtIndex() ?
>
> Thanks,
>
> Thomas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]