I have a collection with 2300 items. When performing a Pageable request from spring locally it takes around 60ms:
Pageable pageable = PageRequest.of(page, 10, Sort.by("id").descending()); List<Order> orderList = orderRepository.findAll(pageable).getContent();
Now I am testing out Atlas. Did a dump and restore and running the same query now takes around 4000 ms!
Removing the desc parameter takes the query down to less than 100 ms. So it looks to me like an index problem?
Of course both my local database and Atlas has the same indexes. All my other queries on the Atlas database works fine.
Anyone has a pointer on how to fix this / investigate further?