Project

General

Profile

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

Speed up retrieving a list of friends in member/home (マイホームにおけるフレンド一覧の取得処理を高速化する)

Added by Eitarow Fukamachi over 11 years ago. Updated over 11 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Target version:
Start date:
2009-12-30
Due date:
% Done:

100%


Description

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

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;

Related issues

Related to OpenPNE 3 - Backport(バックポート) #497: Speed up retrieving a list of friends in member/home (マイホームにおけるフレンド一覧の取得処理を高速化する) Fixed(完了) 2009-12-30

Associated revisions

Revision 23bf96a4 (diff)
Added by Eitarow Fukamachi over 11 years ago

moved Member::getFriends() to MemberRelationshipTable and fixed it because the query execution was too inefficient (refs #400)

Revision 05fcbd4e (diff)
Added by Rimpei Ogawa over 11 years ago

fixed random test repeated 10 times (refs #400)

History

#1 Updated by Eitarow Fukamachi over 11 years ago

  • Status changed from New(新規) to Pending Fixing(修正待ち)
  • % Done changed from 0 to 90

修正しました。

#2 Updated by Eitarow Fukamachi over 11 years ago

  • Target version set to OpenPNE 3.3.2

#3 Updated by Kousuke Ebihara over 11 years ago

  • Status changed from Pending Fixing(修正待ち) to Pending Review(レビュー待ち)
  • % Done changed from 90 to 50

#4 Updated by Kousuke Ebihara over 11 years ago

  • Subject changed from マイホームの友人一覧(9区画)の取得クエリが遅い to Speed up retrieving a list of friends in member/home (マイホームにおけるフレンド一覧の取得処理を高速化する)
  • Status changed from Pending Review(レビュー待ち) to Fixed(完了)
  • % Done changed from 50 to 100

Also available in: Atom PDF