Yii2 has a data provider, for example ActiveDataProvider (ADP). It is possible to customize the sorting on the selected field. My question is what will be faster. Normal query through query builder in Yii2 with ORDER BY or SORT in ADP? In my case there is a pagination on the page. Thanks in advance.
- oneI think that the database server sorts faster (especially if the field by which the index is sorted) than the "universal" client. But if the client is more powerful than the DBMS server, then it can be the other way around. Here you choose yourself who is better to load: the client or server. - nick_n_a
- And doesn’t the provider make the same query in the database? - fedornabilkin
|