Order by with latestdate

Hi All,

I would like to get the data between dates and sort by latestupdated timestamp … but the index is not working…

create index idx_date on student (joiningdate, lastUpdateTimestamp desc) where type = “student”;

select * from student where joiningdate BETWEEN “2019-01-29” AND “2020-02-29” where type = “student” order by lastUpdateTimestamp desc

The above query is taking 1 minute … could any one help.

SELECT  *
FROM  student 
WHERE joiningdate BETWEEN "2019-01-29" AND "2020-02-29"  AND type = "student" 
ORDER  BY  lastUpdateTimestamp DESC;

The index is right index. Query must produce all possible documents of given joiningdate and do explicit sort.
It can’t expose index order because leading index key is joiningdate which is range predicate.

Thanks @vsr1 for your reply. So explicit sort is taking lot of time and is there any way I can improve the performance.