PHOENIX-990 OOM caused by order by query returning all rows (PraveenMurugesan)