Hi,
I have a collection called reviews. Inside this collection, I have 10,000+ documents. When I do a find() and use paginator, the page loads quite slow.
I think is because I have too many documents. How can I optimize this,
$reviews_res = Reviews::find();
$paginator = new \Phalcon\Paginator\Adapter\NativeArray(
array(
"data" => $reviews_res,
"limit"=> 18,
"page" => $currentPage
)
);
$reviewslistpaginated = $paginator->getPaginate();
Advice appreciated. :D