List Info

Thread: default sql_policy query doesn't use all keys?




default sql_policy query doesn't use all keys?
country flaguser name
United States
2007-04-24 16:01:20
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',

'scheidelldomain.com', '.') 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://sourcefor
ge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )