Fix #20226: Revert all PR for "Data providers perform unnecessary COUNT queries that negatively affect performance"

This commit is contained in:
Wilmer Arambula
2024-07-12 01:48:58 -04:00
committed by GitHub
parent 5f5ef64892
commit a6257d8f46
10 changed files with 86 additions and 158 deletions

View File

@ -126,6 +126,7 @@ class SqlDataProvider extends BaseDataProvider
}
if ($pagination !== false) {
$pagination->totalCount = $this->getTotalCount();
$limit = $pagination->getLimit();
$offset = $pagination->getOffset();
}
@ -149,8 +150,10 @@ class SqlDataProvider extends BaseDataProvider
$keys[] = call_user_func($this->key, $model);
}
}
return $keys;
}
return array_keys($models);
}