On 12 Jun 2013, at 14:12, [email protected] wrote:
> In this example, instead of 5 queries (in reality each with 1-2 joins) it is 
> only a single query and even easier to read/work with.

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-file_and_database_lookups.html

"8. Lookup caching
Exim caches all lookup results in order to avoid needless repetition of 
lookups. However, because (apart from the daemon) Exim operates as a collection 
of independent, short-lived processes, this caching applies only within a 
single Exim process. There is no inter-process lookup caching facility."

So, in the first router, if you did a query which SELECTed multiple records 
then that would be saved into address_data. If the *exact same* lookup happened 
in sequential routers, the cached results would be used - thus cutting the 
number of queries.

If however the query was spawned from a different process (as can happen with 
redirection or multiple deliveries with breaks on the queue), additional 
queries will take place.

Graeme
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to