2009/4/16 Ayende Rahien <[email protected]>

>
> If one query is cachable and the result is in the query cache it will
> actually be faster to hit the DB with it anyway, since it is done in the
> same roundtrip.
> The reason is that hitting the cache has some cost, and if we have to go to
> the DB anyway, it doesn't really matter much.
>

I'm not so sure, I'm talking about QueryCache...
IMO using Future<> or not is not the matter. MultiQuery, or something
similar to MultiQuery, should allow the usage of each and/or all queries...
Do you remember this ?
from Auto a where a.id in (:pIdList)
select a.Brand from Auto a where a.id in (:pIdList)

well...
if the user set the pIdList (25 elements) trough MultiQuery the result SQL
should have 25 parameters.
if the user set the pIdList of each IQuery the result SQL should have 50
parameters.

RoundTrips and Cache are part of two different decisions; I can use cache to
avoid "time-hungry" queries and not only to avoid roundtrips, but if the
cache is stale then I would to limit roundtrips too.
-- 
Fabio Maulo

Reply via email to