hi jacob,

> I would think the first one, since the first block may be ids from a
> larger scope (session or application) and the latter being from the
> request scope.

first one: do you mean multiple selects as it is now ?

we can choose between multiple selects or multiple IN-statements in one
select for the same ids.
multiple selects may be slower if the driver does not cache the statement.

jakob

----- Original Message -----
From: "Jacob Hookom" <[EMAIL PROTECTED]>
To: "'OJB Users List'" <[EMAIL PROTECTED]>
Sent: Saturday, October 19, 2002 9:34 PM
Subject: RE: [New Feature] split IN-Criteria


>
>
> | -----Original Message-----
> | From: Jakob Braeuchi [mailto:jbraeuchi@;gmx.ch]
> | Sent: Saturday, October 19, 2002 1:15 PM
> | To: OJB Users List; OJB Developers List
> | Subject: [New Feature] split IN-Criteria
> |
> | hi,
> |
> | i just commited a new feature that allows splitting of large
> IN-Criteria.
> | addIn("id", (1,2,3,4,5,6)) results in WHERE id IN(1,2,3,4) or id
> IN(5,6)
> | with an inLimit of 4.
> |
> | the max number of values of an SQL-IN-Statement (the inLimit)
> isdefined in
> | OJB.properties:
> |
> | #
> | # The SqlInLimit entry limits the number of values in IN-sql
> statement,
> | # -1 for no limits. This hint is used in Criteria.
> | SqlInLimit=200
> | #
> |
> | this entry replaces the former 'PrefetchInLimit' because prefetch now
> also
> | uses 'SqlInLimit'.
> | prefetching still works the _old_ way, using multiple queries instead
> of
> | one
> | with multiple IN-Statement:
> |
> | select from ... where id in(1,2,3,4)
> | select from ... where id in(5,6)
> |
> | this behaviour could now easily be changed to multiple IN-Statements:
> |
> | select form ... where id in(1,2,3,4) or id in(5,6)
> |
> | i just do not know which one is better ???
>
> I would think the first one, since the first block may be ids from a
> larger scope (session or application) and the latter being from the
> request scope.  You could cache the first and only select the latter if
> need be on successive calls?
>
> |
> | jakob
> |
>
> Jacob
>
> |
> | --
> | To unsubscribe, e-mail:
> <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
> | For additional commands, e-mail:
> <mailto:ojb-user-help@;jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to