Author: Nico Erfurth Date: To: exim-users Subject: Re: [Exim] PostgreSQL & Aliassing Again
Sander Smeenk wrote: >> SELECT destination FROM user_aliases
>> WHERE localpart IN ('$local_part', '%') AND domain = '$domain'
>> AND rownum <= 1
>
>
> Yeah! Later I thought of the possibility of sub-selects.
> But I received more efficient queries :)
>
>
>>which does two unique scans rather than a range scan. If you have enough
>>entries to justify using an index at all, mind you :}
>
>
> When the project succeeds we expect to have alot of entries, so indexes
> are needed for sure ;) I'm interrested in the way exim will deal with
> this. Configuration from databases, and high load email traffic...
You should think about dumping the data from the database into a local
file (cdb prefered) because that would make lookups MUCH faster, and you
don't depend on another service as backend for your mailserver, if the
database fails, you still have the local files, with the latest state.