Hi Praneeth,
You can use separate select queries for each year if the fetching is based on the primary key and then use the 'Describe' command to find the number of entries in the internal table for each year.
If the select query is based on the primary keys that can be time saving option.
Also a simple loop cannot cause time out.
Reward points if found suitable.
Regards,
Raj