Open
Description
What steps will reproduce the problem?
using yii\mongodb\Query;
$query->select(['data'])
->from('log')
->where(['userId' => 12234])
->limit(10);
using ActiveRecord
$result = Log::find()
->select(['data'])
->where(['userId' => 12234])
->orderBy(['addedOn' => SORT_DESC])
->offset(0)->limit(10)
->asArray()
->all();
What's expected?
I have around 10528546 document in that collection and it is taking more then one minute to execute the query
Additional info
Q | A |
---|---|
Yii version | 2.0.6 |
Yii MongoDB version | 2.1.0 |
MongoDB server version | 3.6 |
PHP version | 7.0 |
Operating system | Ubuntu 16 |