Re: Question about getIteratorByQuery

2003-11-10 Thread Antonio Gallardo
A Leg dijo:
> You mean that the ojb iterator work exactly in the same the database
> iterator works, taking in count the caching issues ?

yep.

Antonio Gallardo




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question about getIteratorByQuery

2003-11-10 Thread A Leg
Thomas

You mean that the ojb iterator work exactly in the same the database 
iterator works, taking in count the caching issues ?

Excuse me to ask for details, but for my use it is important.

Andre

Mahler Thomas wrote:

Hi again,

 

-Original Message-
From: A Leg [mailto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2003 9:17 AM
To: OJB Users List
Subject: Re: Question about getIteratorByQuery
Thomas

Thanks for you answer.
Ok for a simple database call, but when we make this call to the 
persistence layer, which bring data step by step does it works ?

I make a request on some table with 3 enreg numbers 1, 2 and 5
I ask some iterator at the prsistence layer.
And make next.

Somebody create a new enreg : the number for

When I make next from the number 2. Will I get the number 4 or the 
number 5 ?
   

It really depends on the isolation level supported by your database!
It's not dependend on any OJB features.
- Thomas

 

Thanks for any help.

Andre

Thomas Mahler wrote:

   

Hi Andre,

To follow an index you'll need an order by clause for the indexed 
column. 

 

(http://db.apache.org/ojb/api/org/apache/ojb/broker/query/Crit
   

eria.html#addOrderBy(java.lang.String,%20boolean)) 
 

If you do not use an order by clause the RDBMS is not forced to serve 
rows in a certain sequence.

cu,
Thomas
A Leg wrote:

   

Hi

When we use *getIteratorByQuery and .next().
* do we move throw the table following the index or in some random 
order ?

If we go in random order, what is the best way (getting advantage of 
the cache) to iterate in a table following the index ?

Thank's

Andre

-
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]
   



-
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]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Question about getIteratorByQuery

2003-11-10 Thread Mahler Thomas
Hi again,


> -Original Message-
> From: A Leg [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2003 9:17 AM
> To: OJB Users List
> Subject: Re: Question about getIteratorByQuery
> 
> 
> Thomas
> 
> Thanks for you answer.
> Ok for a simple database call, but when we make this call to the 
> persistence layer, which bring data step by step does it works ?
> 
> I make a request on some table with 3 enreg numbers 1, 2 and 5
> I ask some iterator at the prsistence layer.
> 
> And make next.
> 
> Somebody create a new enreg : the number for
> 
> When I make next from the number 2. Will I get the number 4 or the 
> number 5 ?

It really depends on the isolation level supported by your database!
It's not dependend on any OJB features.

- Thomas

> 
> Thanks for any help.
> 
> Andre
> 
> Thomas Mahler wrote:
> 
> > Hi Andre,
> >
> > To follow an index you'll need an order by clause for the indexed 
> > column. 
> > 
> (http://db.apache.org/ojb/api/org/apache/ojb/broker/query/Crit
eria.html#addOrderBy(java.lang.String,%20boolean)) 
>
>
> If you do not use an order by clause the RDBMS is not forced to serve 
> rows in a certain sequence.
>
> cu,
> Thomas
>
> A Leg wrote:
>
>> Hi
>>
>> When we use *getIteratorByQuery and .next().
>> * do we move throw the table following the index or in some random 
>> order ?
>>
>> If we go in random order, what is the best way (getting advantage of 
>> the cache) to iterate in a table following the index ?
>>
>> Thank's
>>
>> Andre
>>
>>
>> -
>> 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]
>



-
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]



Re: Question about getIteratorByQuery

2003-11-10 Thread A Leg
Thomas

Thanks for you answer.
Ok for a simple database call, but when we make this call to the 
persistence layer, which bring data step by step does it works ?

I make a request on some table with 3 enreg numbers 1, 2 and 5
I ask some iterator at the prsistence layer.
And make next.

Somebody create a new enreg : the number for

When I make next from the number 2. Will I get the number 4 or the 
number 5 ?

Thanks for any help.

Andre

Thomas Mahler wrote:

Hi Andre,

To follow an index you'll need an order by clause for the indexed 
column. 
(http://db.apache.org/ojb/api/org/apache/ojb/broker/query/Criteria.html#addOrderBy(java.lang.String,%20boolean)) 

If you do not use an order by clause the RDBMS is not forced to serve 
rows in a certain sequence.

cu,
Thomas
A Leg wrote:

Hi

When we use *getIteratorByQuery and .next().
* do we move throw the table following the index or in some random 
order ?

If we go in random order, what is the best way (getting advantage of 
the cache) to iterate in a table following the index ?

Thank's

Andre

-
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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Question about getIteratorByQuery

2003-11-10 Thread Thomas Mahler
Hi Andre,

To follow an index you'll need an order by clause for the indexed 
column. 
(http://db.apache.org/ojb/api/org/apache/ojb/broker/query/Criteria.html#addOrderBy(java.lang.String,%20boolean))

If you do not use an order by clause the RDBMS is not forced to serve 
rows in a certain sequence.

cu,
Thomas
A Leg wrote:
Hi

When we use *getIteratorByQuery and .next().
* do we move throw the table following the index or in some random order ?
If we go in random order, what is the best way (getting advantage of the 
cache) to iterate in a table following the index ?

Thank's

Andre

-
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]