Hi,
We have 11gR2 Production database. Table APP.CDR size is 8 TB.
Application team is using following query and getting result within few seconds from this large table.
select * from APP.CDR where apartynumber=8807655083815
But when they use below query to get smaller data set by filtering by between clause, it is taking time to get the output.
select * from APP.CDR where apartynumber=8807655083815 and to_char(to_date(SDATE,'dd/mm/yyyy'),'yyyymmdd') between '20180827' and '20180828'
Please help me to find out the answer, when they are selecting larger amount of data (first query) the output is coming quickly but when they try to select small amount of data (second query) it is taking time to get the output whereas both query is similar. Why is so?