I solved it (don't remember how exactly), but the problem was that the generated query had quite an impact on performance.
Generated query was something like :
Code:
SELECT *
FROM User
WHERE User.UserID IN (SELECT UserID FROM Customer)
ORDER BY UserID ASC
So for each user he'll loop through the Customer table to find a matching record. Since there are about 270.000 results, that was a bit too much :-). I altered the code and now I'm using SQLQuery instead of Query.
Due to design decisions that were taken in the past, I can't create mappings between those objects.