ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Odelya YomTov" <ode...@jpost.com>
Subject RE: caching question
Date Thu, 22 Oct 2009 13:25:54 GMT
So if lets say the result could return 200 records, and the cacheModel size
is set for 100 - would it return only 100 results? Or the next time it would
actually display only the 100 records and not 200?

-----Original Message-----
From: meindert [mailto:meindert@eduflex.com] 
Sent: Thursday, October 22, 2009 3:23 PM
To: user-java@ibatis.apache.org
Subject: RE: caching question

>Do you mean that actually it invokes the database when I execute the query?
No, only the first time, the next time you ask the same query with the same
parameters it will get the resultset from the cache
The cache size is the number of different result sets are stored in the
cache.

So if you invoke the same query (with the same parameters) multiple times it
only does one round trip.
This is handy for example if you have a query that is executed after a
logon. This same query is repeated every time a logon is done. So you could
put the result in a server level variable or you use the ibatis cache.
Another example would be a grid in your application that is requested by
multiple users (as long if it is requested with similar parameters)

If you're result set size is 800000 records or if the query parameters are
different for every screen, ibatis caching is not for you, 





-----Original Message-----
From: Odelya YomTov [mailto:odelya@jpost.com] 
Sent: 22 October 2009 03:05 PM
To: user-java@ibatis.apache.org
Subject: RE: caching question

Do you mean that actually it invokes the database when I execute the query?
If so, what is the point of caching?

-----Original Message-----
From: meindert [mailto:meindert@eduflex.com] 
Sent: Thursday, October 22, 2009 3:01 PM
To: user-java@ibatis.apache.org
Subject: RE: caching question

It's the result you cache not the query. How many different query result
would you like to cache


-----Original Message-----
From: Odelya YomTov [mailto:odelya@jpost.com] 
Sent: 22 October 2009 02:29 PM
To: user-java@ibatis.apache.org
Subject: caching question

Hi!

I have a global question about caching.

I have in my database around 800000 recrods

In cacheModel - what do you recommend as the size of the cacheModel?

I am using the query almost in every screen.

Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.423 / Virus Database: 270.14.20/2444 - Release Date: 10/21/09
16:44:00


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


 
 
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********





---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.423 / Virus Database: 270.14.20/2444 - Release Date: 10/21/09
16:44:00


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


 
 
****************************************************************************
********
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer
viruses.
****************************************************************************
********





---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message