mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-10-31 02:28:35 +08:00 
			
		
		
		
	Fix #20226: Revert all PR for "Data providers perform unnecessary COUNT queries that negatively affect performance"
This commit is contained in:
		| @ -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); | ||||
|     } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Wilmer Arambula
					Wilmer Arambula