I have an application which is just a reporting tool so it just queries a database and fetches a plenty of records. The database is quite heavy and it takes a significant amount of time for my code to fetch records and display.
To make the situation worse - there are a no of different criterias for the queries based upon different combination of the columns in the table.
my question is that as of now for every combination of criteria i am having a seperate query. is there any other way so that i don't end up with having 100 queries in my code.