Project

General

Profile

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

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

Added by Kiwa Sakai over 12 years ago. Updated almost 6 years ago.

Status:
New(新規)
Priority:
Normal(通常)
Assignee:
-
Target version:
Start date:
2010-07-14
Due date:
% Done:

0%


Description

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

  • 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 のマージをお願いします。

History

#1 Updated by Shinichi Urabe almost 6 years ago

  • Target version set to Unplanned

Also available in: Atom PDF