Project

General

Profile

Enhancement(機能追加・改善) #634

マイホームの友人一覧(9区画)の取得クエリが遅い (2009/12/28 third】id=1)

Added by Hiroki Mogi over 14 years ago. Updated over 14 years ago.

Status:
Invalid(無効)
Priority:
Normal(通常)
Assignee:
Target version:
-
Start date:
2010-02-15
Due date:
% Done:

0%


Description

現象

実環境で負荷試験をした際、以下のクエリが6分近くかかっていました。

SELECT m.id AS m__id, m.name AS m__name, m.invite_member_id AS m__invite_member_id, m.is_login_rejected AS m__is_login_rejected, m.created_at AS m__created_at, m.updated_at AS m__updated_at, m.is_active AS m__is_active FROM member m WHERE m.id IN (SELECT m2.member_id_to AS m2__member_id_to FROM member_relationship m2 WHERE (m2.member_id_from = ? AND m2.is_friend = '1')) AND (m.is_active = '1' OR m.is_active IS NULL) ORDER BY RAND() LIMIT 9;

原因

マイホームのフレンド一覧を表示する際に呼ばれる、Member::getFriend()で発するクエリ。

History

#1 Updated by Eitarow Fukamachi over 14 years ago

  • Status changed from New(新規) to Invalid(無効)

#400 で修正されています

Also available in: Atom PDF