對於一個操作請求,我會看到大概6個用於User模型的似乎是AuthLogic相關記錄更新的計數。我想知道這是否正常,或者是否有其他人遇到過這個問題,我該怎麼辦。我仍然試圖追查這個原因,但我高度懷疑它與AuthLogic有關。對於一個請求,AuthLogic似乎多次更新用戶記錄
正如您所看到的,對記錄的更新非常緩慢,並且在一個請求內發生所有這些更新令人擔憂!
SQL (0.1ms) BEGIN
AREL (0.6ms) UPDATE `users` SET `last_request_at` = '2012-06-22 22:02:43', `perishable_token` = 'rGvsUjfDYw4lrFk6bYJu', `updated_at` = '2012-06-22 22:02:43' WHERE `users`.`id` = 6697
SQL (91.8ms) COMMIT
User Load (0.7ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 6697 LIMIT 1
SQL (0.2ms) BEGIN
AREL (0.5ms) UPDATE `users` SET `last_request_at` = '2012-06-22 22:02:43', `perishable_token` = 'CHSKWhMmNHB5h8HeAWI', `updated_at` = '2012-06-22 22:02:43' WHERE `users`.`id` = 6697
SQL (43.2ms) COMMIT
User Load (0.7ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 6697 LIMIT 1
SQL (0.2ms) BEGIN
AREL (0.5ms) UPDATE `users` SET `last_request_at` = '2012-06-22 22:02:44', `perishable_token` = 'yDEGFCy4JrKrLVOKhwP', `updated_at` = '2012-06-22 22:02:44' WHERE `users`.`id` = 6697
SQL (43.4ms) COMMIT
User Load (0.7ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 6697 LIMIT 1
SQL (0.1ms) BEGIN
AREL (0.3ms) UPDATE `users` SET `last_request_at` = '2012-06-22 22:02:44', `perishable_token` = 'TSrzZCKL2C0R5BPJAkVA', `updated_at` = '2012-06-22 22:02:44' WHERE `users`.`id` = 6697
SQL (36.6ms) COMMIT
User Load (0.7ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 6697 LIMIT 1
SQL (0.1ms) BEGIN
AREL (0.3ms) UPDATE `users` SET `last_request_at` = '2012-06-22 22:02:44', `perishable_token` = 'hfRuoHYvIQZCdd8obtA', `updated_at` = '2012-06-22 22:02:44' WHERE `users`.`id` = 6697
SQL (38.4ms) COMMIT
你已經找到了原因是什麼?我看到了同樣的問題。 – konung