I've monitored slow performances in the past within a symfony application. Found out that those built in ORM's (Doctrine in my case) query methods are really a bad thing, especially within a foreach loop.
I'd suggest you to try using RAW SQL instead.
If you don't know how to use raw sql within symfony this should do the trick
$connection = Doctrine_Manager::connection();
$statement = $connection->prepare('your sql statement');
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_NUM); // or whatever fetch mode you want to use