Answer the question
In order to leave comments, you need to log in
Why does SQL query in Yii 1.1.17 slow down hundreds of times compared to direct query?
request:
Yii::app()->getDb()->CreateCommand('
SELECT
COUNT(DISTINCT `t`.`user_id`)
FROM
`tbl_profile_profile` `t`
LEFT OUTER JOIN `tbl_user_user` `user` ON (`t`.`user_id` = `user`.`id`)
WHERE
(
(
t.`type` = 0
AND (`user`.access_level <= 2)
)
AND (t.`status` = 2)
)'
)->execute();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question