Looking at optimizations for sql queries in amavisd-new,  default 
sql_policy can't find enough key material to use? or is this impossible 
due to the IN statement?

even the default query uses 'filesort'.

is it the IN statement?

mysql> explain select *,users.id from users left join policy on 
users.policy_id=policy.id where users.email in ('scheidell', 
'[EMAIL PROTECTED]', '@.') order by users.priority desc;
+----+-------------+--------+--------+---------------+---------+---------+----------------------+------+-----------------------------+
| id | select_type | table  | type   | possible_keys | key     | key_len 
| ref                  | rows | Extra                       |
+----+-------------+--------+--------+---------------+---------+---------+----------------------+------+-----------------------------+
|  1 | SIMPLE      | users  | range  | email_2,email | email_2 | 257     
| NULL                 |    3 | Using where; Using filesort |
|  1 | SIMPLE      | policy | eq_ref | PRIMARY,id    | PRIMARY | 4       
| mail.users.policy_id |    1 |                             |
+----+-------------+--------+--------+---------------+---------+---------+----------------------+------+-----------------------------+



_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to