yii2-redis
yii2-redis copied to clipboard
ActiveRecord is slow when use where condition.
ActiveRecord is very flat and slow (if we have many records at redis hash) when we try get with where condition. For example:
RedisModelAR::find()
->where(['login' => $login])
->one();
Because when go to findByPk use HGETALL.
What about rewrite logic at ActiveQuery with HMGET etc. for best performance ? And fields(AR attributes) store as hash field redis(hmset) not json or serialize.
Any idea on how to do it? If yes, would you mind working on a pull request?