hi,
i use exim 3.33 with mysql and i have found a slow, unoptimized query in my
config file.
MYSQL_DOMAIN = SELECT DISTINCT MYSQL_DOMAINFIELD FROM MYSQL_AUTHTABLE WHERE
MYSQL_DOMAINFIELD='$key'
returns 1 record with $key. (12.67 sec)
my query returns the same record but in "0.00 sec"
MYSQL_DOMAIN = SELECT MYSQL_DOMAINFIELD FROM MYSQL_AUTHTABLE WHERE
MYSQL_DOMAINFIELD='$key' LIMIT 1
is my query O.K. or is there any reason why not.
thanks
Attila Soki
Examples:
mysql> select domain from mail where domain="xy.com" limit 1;
+-----------+
| domain |
+-----------+
| xy.com |
+-----------+
1 row in set (0.00 sec)
mysql> select distinct domain from mail where domain="xy.com";
+-----------+
| domain |
+-----------+
| xy.com |
+-----------+
1 row in set (12.67 sec)
mysql> select count(*) from mail;
+----------+
| count(*) |
+----------+
| 429657 |
+----------+
1 row in set (0.00 sec)