I have a table that has 80,000 records i have to read all data and I cannot filter records. It takes over 90 seconds. This is way too slow. I tried with setFetchSize of 50,100,1000,10000. Nothing helped.
Connection conn = getJdbcTemplate().getDataSource().getConnection();
there can be a lot of things that will slow down your retrieval beyond the database, depending upon your network topology, server location, etc. What is the priority that you are running at? How heavily loaded is the system? How long is your query waiting before execution?
Once your query is executed and considering that you say you are unable to filter, that may mean that you are doing a simple select operation wherein you bring back all the data to spool and then consume it. That would likely only take a few seconds while all the rest of the time is spent working with the retrieval logic and the network. As Raja suggested earlier, I would check with the DBA but also with the network personnel to find out how much affect the network has on returning all of that data.
There are many moving parts, any one of which may slow your retrieval.