Fix query which will takes too long for large installations.
Merge pull request #173 from jvigna/master

Changed services_log mysql query because as is it is too slow for large installations