Hi Stanley,
To complement what Guilherme mentioned, please have a look on the following post:
http://www.outsystems.com/forums/discussion/15702/tip-performance-of-query-in-outsystems-platform-slower-than-running-in-database/
There you have additional information on how to troubleshoot this kind of issues.
Kind regards,
Ivo Gonçalves
Kind regards,
Ivo Gonçalves