How to fetch 600000 data into table by using php

Hi every one ,

I have been working with mongodb last 4 months only I am new to this ,in my collection I have around more then 600000 data when I am trying to fetch this data in front end table by using datatable or I tried normal table also ,It is taking more then 10 min and some times it is taking more then 20 min also .

Each document I have 16 fields is there and my query has show below.

$mongo = new MongoDB\Driver\Manager("mongodb://localhost:27017");    
$bulk = new MongoDB\Driver\BulkWrite;
$filter = [ "columnname" => 0];							
$options = [ 'sort' => ['modified_date' => -1] ];
$qry = new MongoDB\Driver\Query($filter,$options);
$rows = $mongo->executeQuery("testDB.testCollection", $qry);
foreach($rows  as $row){

//table structure 
echo $row->id;
echo $row->test1;
echo $row->test2;
echo $row->test3;
echo $row->test4;
.....
echo $row->test16;
}

I created index on modified_date(-1 desc) and columnname.

There is no integration with datatable and mongdb to use server side script by using datatable .

How can I fetch more then 600000 data into front end table (in table search option and pagination should be there ) and It should date within seconds only.

please could any once help on it.

I have been struggling from so many days,please help on it.

Thanks