[Date Prev][Date Next]
(ITS#4605) backs-sql: speedup when using views
Full_Name: Thomas Reifferscheid
Submission from: (NULL) (188.8.131.52)
Here is what I found out when it's about using views with back-sql
I was playing with back-sql, in detail with mysql when noticing that
searching over two views or more get's *VERY* slow. So I was
looking for an replacement of the setup that can be found in
I finally came to the result of using just *one* view in my mysql-database.
That gave me a strange error that looks like the follwing
error message of the sql-server log:
SELECT DISTINCT ldap_entries.id,ldap_entries.id,'inetOrgPerson' AS
objectClass,ldap_entries.dn AS dn FROM ldap_entries,ldap_entries WHERE
ldap_entries.id=ldap_entries.keyval AND ldap_entries.oc_map_id=1 AND 9=9 AND
and the errormessage was: ERROR 1066 (42000): Not unique table/alias:
as "FROM ldap_entries,ldap_entries" is not working here.
So I patched servers/slapd/back-sql/search.c and now everything is working
at a useable speed for our MUA's (Thunderbird) that use slapd.
Additional information that can be found at the provided URL:
- the patch
- mysql-tables used according to man back-sql
- the *one* view ldap_entries holding all information
Please feel free to ask back.