Hi,
I ran the same query on my local lab which took 16 min to complete.
In your case, I believe the issue is since it doesn't have a specific filter, it will try to get the result of all which may take more time.
This depends on the DB size.
To rectify this,
- Please do regular indexing
- If you are using an external DB, please do DB partitioning
To understand more, we would need the information of DB size, DB partition, data retention period, indexing and statistics run.
Please raise a Support Ticket in-case the above Points doesn't help.
Regards,
Shibani