[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4605) backs-sql: speedup when using views

On Sat, 1 Jul 2006, Pierangelo Masarati wrote:

>> Can it be done in other ways? Or is rejecting the patch everything
>> that can be done?
> To me, at least, it looks like a reasonable starting point :).
> Unfortunately, I don't have time right now to see if and how this
> particular case could be generalized to something that complies to the
> data model of back-sql.  It is not yet clear to me why you need to turn
> ldap_entries into a view that contains also the data and not only the
> connectivity info.

In my first attempt, according to man 5 back-sql, I had
two views:

one was: ldap_entries, containing the dn's (e.g. dn: uid=5, dc=...)
and the key-column and the other stuff required.

the 2nd view was:
key  cn sn mail

When entering a mail-adress into thunderbird, the answer from
slapd took 5-10 seconds and that's way to long.
(A complete ldapsearch took 30 seconds).

With the hijacked version:
the answer arrives immediatly and a complete ldapsearch
lasts 1.3 seconds.
The amount of querys send to mysql reduces as well by factor 3.

So the cause is mysql, thats for sure. But gaining speed at other
places sometimes might be helpful as well.

So you can close the issue, I will handle my own patch
as long as mysql does not support indices on views and
revert my hijacker-version to appropriate stuff afterwards.

That will let both of us have more time.

Thank you.

Kind regards
Thomas Reifferscheid