Project

General

Profile

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

マイフレンドのカウントで発行されるクエリが遅い

Added by Hiroki Mogi almost 11 years ago. Updated over 10 years ago.

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

100%


Description

現象

2010/01/04の負荷試験で以下のクエリがスロークエリになっていました。

Count: 13  Time=3.77s (49s)  Lock=0.00s (0s)  Rows=1.0 (13), root[root]@localhost
SELECT COUNT(*) AS num_results FROM (SELECT m.id 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 = 'S' AND m2.is_friend = 'S')) AND (m.is_active = 'S' OR m.is_active IS NULL) GROUP BY m.id) dctrn_count_query

Associated revisions

Revision 4d624170 (diff)
Added by Eitarow Fukamachi over 10 years ago

changed not to use subquery at whereIn clause in MemberRelationshipTable::getFriendListPager() (refs #631)

Revision ed193ced (diff)
Added by Eitarow Fukamachi over 10 years ago

changed not to use subquery at whereIn clause in MemberRelationshipTable::getFriendListPager() (fixes #631)

History

#1 Updated by Eitarow Fukamachi over 10 years ago

  • Status changed from New(新規) to Accepted(着手)
  • Assignee changed from Shingo Yamada to Eitarow Fukamachi
  • % Done changed from 0 to 90

MemberRelationshipTable::getFriendListPager()のサブクエリをなくしました。

#2 Updated by Eitarow Fukamachi over 10 years ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)

#3 Updated by Kousuke Ebihara over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to Accepted(着手)
  • Assignee changed from Eitarow Fukamachi to Kousuke Ebihara
  • Target version set to OpenPNE 3.5.2
  • % Done changed from 90 to 0

master もしくはリリースブランチに対して変更がおこなわれていません。管理できなくなるのでフローに従った開発を心がけてください。修正の取り込みは海老原が引き受けます。

#4 Updated by Eitarow Fukamachi over 10 years ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

更新履歴 ed193ced042249bafb4a245afe6cb29a1b97a9ec で適用されました。

#5 Updated by Kousuke Ebihara over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)

#6 Updated by Kiwa Sakai over 10 years ago

  • Status changed from Pending Testing(テスト待ち) to Fixed(完了)
  • % Done changed from 50 to 100

Also available in: Atom PDF