We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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();
I have around 10528546 document in that collection and it is taking more then one minute to execute the query
The text was updated successfully, but these errors were encountered:
is it faster if you try the same query without Yii?
Sorry, something went wrong.
When i executve the same query in mongo console or robo 3t it took only approximate 10 sec
Query: db.getCollection('log').find({'userId': 23453})
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: