プロジェクト

全般

プロフィール

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

未完了

スロークエリ:メッセージ関連SQLの改善

Kiwa Sakai さんが14年以上前に追加. ほぼ8年前に更新.

ステータス:
New(新規)
優先度:
Normal(通常)
担当者:
-
対象バージョン:
開始日:
2010-07-14
期日:
進捗率:

0%

予定工数:

説明

下記、スロークエリの発生箇所の特定・改善

  • SELECT COUNT AS num_results FROM (SELECT m.id FROM message_send_list m WHERE m.member_id = 'S' AND m.is_deleted = 'S' AND m.message_id IN (SELECT m2.id AS m2__id FROM message m2 WHERE (m2.is_send = 'S')) GROUP BY m.id) dctrn_count_query
  • SELECT m.id AS m__id, m.member_id AS m__member_id, m.subject AS m__subject, m.body AS m__body, m.is_deleted AS m__is_deleted, m.is_send AS m__is_send, m.thread_message_id AS m__thread_message_id, m.return_message_id AS m__return_message_id, m.message_type_id AS m__message_type_id, m.foreign_id AS m__foreign_id, m.created_at AS m__created_at, m.updated_at AS m__updated_at FROM message m WHERE (m.member_id = 'S' AND m.is_send = 'S' AND m.return_message_id = 'S') LIMIT N
  • SELECT COUNT AS num_results FROM (SELECT m.id FROM message_send_list m WHERE m.member_id = 'S' AND m.is_deleted = 'S' AND m.is_read = 'S' AND m.message_id IN (SELECT m2.id AS m2__id FROM message m2 WHERE (m2.is_send = 'S')) GROUP BY m.id) dctrn_count_query
  • SELECT m.id AS m__id, m.member_id AS m__member_id, m.subject AS m__subject, m.body AS m__body, m.is_deleted AS m__is_deleted, m.is_send AS m__is_send, m.thread_message_id AS m__thread_message_id, m.return_message_id AS m__return_message_id, m.message_type_id AS m__message_type_id, m.foreign_id AS m__foreign_id, m.created_at AS m__created_at, m.updated_at AS m__updated_at FROM message m WHERE (m.id = 'S')

https://trac.openpne.jp/svn/OpenPNE3/plugins/opMessagePlugin/branches/tuning_slowquery_3_6beta1 のコミット r13566 のマージをお願いします。

他の形式にエクスポート: Atom PDF