자꾸 DB접속에러가 뜹니다.

자꾸 DB접속에러가 뜹니다.

QA

자꾸 DB접속에러가 뜹니다.

답변 1

본문

슬로우 쿼리 문제로 과다한 요청 때문에 사이트가 자꾸 닫히는 문제가 발생하고 있습니다.

 

혹시 DB쪽에 대해 잘 아시는 분 있으시면 좀 확인바랍니다.

 

어떤 문제가 있어서 어떻게 고쳐야 하는지요?

 

 

select * from (  select 'notice_03' as bo_table, g4_write_notice_03.wr_id, g4_write_notice_03.wr_parent, g4_write_notice_03.wr_num, g4_write_notice_03.wr_reply, g4_write_notice_03.wr_comment, g4_write_notice_03.wr_option, g4_write_notice_03.wr_subject, g4_write_notice_03.wr_content, g4_write_notice_03.wr_link1, g4_write_notice_03.wr_link2, g4_write_notice_03.wr_link1_hit, g4_write_notice_03.wr_link2_hit, g4_write_notice_03.wr_hit, g4_write_notice_03.wr_good, g4_write_notice_03.wr_nogood, g4_write_notice_03.mb_id, g4_write_notice_03.wr_name, g4_write_notice_03.wr_email, g4_write_notice_03.wr_homepage, g4_write_notice_03.wr_datetime, g4_write_notice_03.wr_1, g4_write_notice_03.wr_2, g4_write_notice_03.wr_3, g4_write_notice_03.wr_4, g4_write_notice_03.wr_5, g4_write_notice_03.wr_6, g4_write_notice_03.wr_7, g4_write_notice_03.wr_8, g4_write_notice_03.wr! _9, g4_write_notice_03.wr_10 from g4_write_notice_03 where wr_is_comment=0     UNION ALL  select 'notice_06' as bo_table, g4_write_notice_06.wr_id, g4_write_notice_06.wr_parent, g4_write_notice_06.wr_num, g4_write_notice_06.wr_reply, g4_write_notice_06.wr_comment, g4_write_notice_06.wr_option, g4_write_notice_06.wr_subject, g4_write_notice_06.wr_content, g4_write_notice_06.wr_link1, g4_write_notice_06.wr_link2, g4_write_notice_06.wr_link1_hit, g4_write_notice_06.wr_link2_hit, g4_write_notice_06.wr_hit, g4_write_notice_06.wr_good, g4_write_notice_06.wr_nogood, g4_write_notice_06.mb_id, g4_write_notice_06.wr_name, g4_write_notice_06.wr_email, g4_write_notice_06.wr_homepage, g4_write_notice_06.wr_datetime, g4_write_notice_06.wr_1, g4_write_notice_06.wr_2, g4_write_notice_06.wr_3, g4_write_notice_06.wr_4, g4_write_notice_06.wr_5, g4_write_notice_06.wr_6, g4_write_notice_06.wr_7, g4_write_notice_06.wr_8, g4_write_notice_06.wr_9, g4_write_notice_06.wr_10 from g4_wr! ite_notice_06 where wr_is_comment=0     UNION ALL&nb! sp; sele ct 'notice_07' as bo_table, g4_write_notice_07.wr_id, g4_write_notice_07.wr_parent, g4_write_notice_07.wr_num, g4_write_notice_07.wr_reply, g4_write_notice_07.wr_comment, g4_write_notice_07.wr_option, g4_write_notice_07.wr_subject, g4_write_notice_07.wr_content, g4_write_notice_07.wr_link1, g4_write_notice_07.wr_link2, g4_write_notice_07.wr_link1_hit, g4_write_notice_07.wr_link2_hit, g4_write_notice_07.wr_hit, g4_write_notice_07.wr_good, g4_write_notice_07.wr_nogood, g4_write_notice_07.mb_id, g4_write_notice_07.wr_name, g4_write_notice_07.wr_email, g4_write_notice_07.wr_homepage, g4_write_notice_07.wr_datetime, g4_write_notice_07.wr_1, g4_write_notice_07.wr_2, g4_write_notice_07.wr_3, g4_write_notice_07.wr_4, g4_write_notice_07.wr_5, g4_write_notice_07.wr_6, g4_write_notice_07.wr_7, g4_write_notice_07.wr_8, g4_write_notice_07.wr_9, g4_write_notice_07.wr_10 from g4_write_notice_07 where wr_is_comment=0     UNION ALL  select 'notice_08' as bo_table, g4_write_not! ice_08.wr_id, g4_write_notice_08.wr_parent, g4_write_notice_08.wr_num, g4_write_notice_08.wr_reply, g4_write_notice_08.wr_comment, g4_write_notice_08.wr_option, g4_write_notice_08.wr_subject, g4_write_notice_08.wr_content, g4_write_notice_08.wr_link1, g4_write_notice_08.wr_link2, g4_write_notice_08.wr_link1_hit, g4_write_notice_08.wr_link2_hit, g4_write_notice_08.wr_hit, g4_write_notice_08.wr_good, g4_write_notice_08.wr_nogood, g4_write_notice_08.mb_id, g4_write_notice_08.wr_name, g4_write_notice_08.wr_email, g4_write_notice_08.wr_homepage, g4_write_notice_08.wr_datetime, g4_write_notice_08.wr_1, g4_write_notice_08.wr_2, g4_write_notice_08.wr_3, g4_write_notice_08.wr_4, g4_write_notice_08.wr_5, g4_write_notice_08.wr_6, g4_write_notice_08.wr_7, g4_write_notice_08.wr_8, g4_write_notice_08.wr_9, g4_write_notice_08.wr_10 from g4_write_notice_08 where wr_is_comment=0     UNION ALL  select 'notice_10' as bo_table, g4_write_notice_10.wr_id, g4_write_notice_10.wr_par! ent, g4_write_notice_10.wr_num, g4_write_notice_10.wr_reply, g! 4_write_ notice_10.wr_comment, g4_write_notice_10.wr_option, g4_write_notice_10.wr_subject, g4_write_notice_10.wr_content, g4_write_notice_10.wr_link1, g4_write_notice_10.wr_link2, g4_write_notice_10.wr_link1_hit, g4_write_notice_10.wr_link2_hit, g4_write_notice_10.wr_hit, g4_write_notice_10.wr_good, g4_write_notice_10.wr_nogood, g4_write_notice_10.mb_id, g4_write_notice_10.wr_name, g4_write_notice_10.wr_email, g4_write_notice_10.wr_homepage, g4_write_notice_10.wr_datetime, g4_write_notice_10.wr_1, g4_write_notice_10.wr_2, g4_write_notice_10.wr_3, g4_write_notice_10.wr_4, g4_write_notice_10.wr_5, g4_write_notice_10.wr_6, g4_write_notice_10.wr_7, g4_write_notice_10.wr_8, g4_write_notice_10.wr_9, g4_write_notice_10.wr_10 from g4_write_notice_10 where wr_is_comment=0     UNION ALL  select 'notice_11' as bo_table, g4_write_notice_11.wr_id, g4_write_notice_11.wr_parent, g4_write_notice_11.wr_num, g4_write_notice_11.wr_reply, g4_write_notice_11.wr_comment, g4_write_notice_11 .wr_option, g4_write_notice_11.wr_subject, g4_write_notice_11.wr_content, g4_write_notice_11.wr_link1, g4_write_notice_11.wr_link2, g4_write_notice_11.wr_link1_hit, g4_write_notice_11.wr_link2_hit, g4_write_notice_11.wr_hit, g4_write_notice_11.wr_good, g4_write_notice_11.wr_nogood, g4_write_notice_11.mb_id, g4_write_notice_11.wr_name, g4_write_notice_11.wr_email, g4_write_notice_11.wr_homepage, g4_write_notice_11.wr_datetime, g4_write_notice_11.wr_1, g4_write_notice_11.wr_2, g4_write_notice_11.wr_3, g4_write_notice_11.wr_4, g4_write_notice_11.wr_5, g4_write_notice_11.wr_6, g4_write_notice_11.wr_7, g4_write_notice_11.wr_8, g4_write_notice_11.wr_9, g4_write_notice_11.wr_10 from g4_write_notice_11 where wr_is_comment=0     UNION ALL  select 'notice_13' as bo_table, g4_write_notice_13.wr_id, g4_write_notice_13.wr_parent, g4_write_notice_13.wr_num, g4_write_notice_13.wr_reply, g4_write_notice_13.wr_comment, g4_write_notice_13.wr_option, g4_write_notice_13.wr_subje! ct, g4_write_notice_13.wr_content, g4_write_notice_13.wr_link1! , g4_wri te_notice_13.wr_link2, g4_write_notice_13.wr_link1_hit, g4_write_notice_13.wr_link2_hit, g4_write_notice_13.wr_hit, g4_write_notice_13.wr_good, g4_write_notice_13.wr_nogood, g4_write_notice_13.mb_id, g4_write_notice_13.wr_name, g4_write_notice_13.wr_email, g4_write_notice_13.wr_homepage, g4_write_notice_13.wr_datetime, g4_write_notice_13.wr_1, g4_write_notice_13.wr_2, g4_write_notice_13.wr_3, g4_write_notice_13.wr_4, g4_write_notice_13.wr_5, g4_write_notice_13.wr_6, g4_write_notice_13.wr_7, g4_write_notice_13.wr_8, g4_write_notice_13.wr_9, g4_write_notice_13.wr_10 from g4_write_notice_13 where wr_is_comment=0     UNION ALL  select 'community_01' as bo_table, g4_write_community_01.wr_id, g4_write_community_01.wr_parent, g4_write_community_01.wr_num, g4_write_community_01.wr_reply, g4_write_community_01.wr_comment, g4_write_community_01.wr_option, g4_write_community_01.wr_subject, g4_write_community_01.wr_content, g4_write_community_01.wr_link1, g4_write_communi! ty_01.wr_link2, g4_write_community_01.wr_link1_hit, g4_write_community_01.wr_link2_hit, g4_write_community_01.wr_hit, g4_write_community_01.wr_good, g4_write_community_01.wr_nogood, g4_write_community_01.mb_id, g4_write_community_01.wr_name, g4_write_community_01.wr_email, g4_write_community_01.wr_homepage, g4_write_community_01.wr_datetime, g4_write_community_01.wr_1, g4_write_community_01.wr_2, g4_write_community_01.wr_3, g4_write_community_01.wr_4, g4_write_community_01.wr_5, g4_write_community_01.wr_6, g4_write_community_01.wr_7, g4_write_community_01.wr_8, g4_write_community_01.wr_9, g4_write_community_01.wr_10 from g4_write_community_01 where wr_is_comment=0     UNION ALL  select 'community_02' as bo_table, g4_write_community_02.wr_id, g4_write_community_02.wr_parent, g4_write_community_02.wr_num, g4_write_community_02.wr_reply, g4_write_community_02.wr_comment, g4_write_community_02.wr_option, g4_write_community_02.wr_subject, g4_write_community_02.wr_! content, g4_write_community_02.wr_link1, g4_write_community_02! .wr_link 2, g4_write_community_02.wr_link1_hit, g4_write_community_02.wr_link2_hit, g4_write_community_02.wr_hit, g4_write_community_02.wr_good, g4_write_community_02.wr_nogood, g4_write_community_02.mb_id, g4_write_community_02.wr_name, g4_write_community_02.wr_email, g4_write_community_02.wr_homepage, g4_write_community_02.wr_datetime, g4_write_community_02.wr_1, g4_write_community_02.wr_2, g4_write_community_02.wr_3, g4_write_community_02.wr_4, g4_write_community_02.wr_5, g4_write_community_02.wr_6, g4_write_community_02.wr_7, g4_write_community_02.wr_8, g4_write_community_02.wr_9, g4_write_community_02.wr_10 from g4_write_community_02 where wr_is_comment=0     UNION ALL  select 'community_03' as bo_table, g4_write_community_03.wr_id, g4_write_community_03.wr_parent, g4_write_community_03.wr_num, g4_write_community_03.wr_reply, g4_write_community_03.wr_comment, g4_write_community_03.wr_option, g4_write_community_03.wr_subject, g4_write_community_03.wr_content, g4_wr! ite_community_03.wr_link1, g4_write_community_03.wr_link2, g4_write_community_03.wr_link1_hit, g4_write_community_03.wr_link2_hit, g4_write_community_03.wr_hit, g4_write_community_03.wr_good, g4_write_community_03.wr_nogood, g4_write_community_03.mb_id, g4_write_community_03.wr_name, g4_write_community_03.wr_email, g4_write_community_03.wr_homepage, g4_write_community_03.wr_datetime, g4_write_community_03.wr_1, g4_write_community_03.wr_2, g4_write_community_03.wr_3, g4_write_community_03.wr_4, g4_write_community_03.wr_5, g4_write_community_03.wr_6, g4_write_community_03.wr_7, g4_write_community_03.wr_8, g4_write_community_03.wr_9, g4_write_community_03.wr_10 from g4_write_community_03 where wr_is_comment=0     UNION ALL  select 'community_04' as bo_table, g4_write_community_04.wr_id, g4_write_community_04.wr_parent, g4_write_community_04.wr_num, g4_write_community_04.wr_reply, g4_write_community_04.wr_comment, g4_write_community_04.wr_option, g4_write_communi! ty_04.wr_subject, g4_write_community_04.wr_content, g4_write_c! ommunity _04.wr_link1, g4_write_community_04.wr_link2, g4_write_community_04.wr_link1_hit, g4_write_community_04.wr_link2_hit, g4_write_community_04.wr_hit, g4_write_community_04.wr_good, g4_write_community_04.wr_nogood, g4_write_community_04.mb_id, g4_write_community_04.wr_name, g4_write_community_04.wr_email, g4_write_community_04.wr_homepage, g4_write_community_04.wr_datetime, g4_write_community_04.wr_1, g4_write_community_04.wr_2, g4_write_community_04.wr_3, g4_write_community_04.wr_4, g4_write_community_04.wr_5, g4_write_community_04.wr_6, g4_write_community_04.wr_7, g4_write_community_04.wr_8, g4_write_community_04.wr_9, g4_write_community_04.wr_10 from g4_write_community_04 where wr_is_comment=0     UNION ALL  select 'community_05' as bo_table, g4_write_community_05.wr_id, g4_write_community_05.wr_parent, g4_write_community_05.wr_num, g4_write_community_05.wr_reply, g4_write_community_05.wr_comment, g4_write_community_05.wr_option, g4_write_community_05.wr_subje! ct, g4_write_community_05.wr_content, g4_write_community_05.wr_link1, g4_write_community_05.wr_link2, g4_write_community_05.wr_link1_hit, g4_write_community_05.wr_link2_hit, g4_write_community_05.wr_hit, g4_write_community_05.wr_good, g4_write_community_05.wr_nogood, g4_write_community_05.mb_id, g4_write_community_05.wr_name, g4_write_community_05.wr_email, g4_write_community_05.wr_homepage, g4_write_community_05.wr_datetime, g4_write_community_05.wr_1, g4_write_community_05.wr_2, g4_write_community_05.wr_3, g4_write_community_05.wr_4, g4_write_community_05.wr_5, g4_write_community_05.wr_6, g4_write_community_05.wr_7, g4_write_community_05.wr_8, g4_write_community_05.wr_9, g4_write_community_05.wr_10 from g4_write_community_05 where wr_is_comment=0     UNION ALL  select 'community_06' as bo_table, g4_write_community_06.wr_id, g4_write_community_06.wr_parent, g4_write_community_06.wr_num, g4_write_community_06.wr_reply, g4_write_community_06.wr_comment, g4_wri! te_community_06.wr_option, g4_write_community_06.wr_subject, g! 4_write_ community_06.wr_content, g4_write_community_06.wr_link1, g4_write_community_06.wr_link2, g4_write_community_06.wr_link1_hit, g4_write_community_06.wr_link2_hit, g4_write_community_06.wr_hit, g4_write_community_06.wr_good, g4_write_community_06.wr_nogood, g4_write_community_06.mb_id, g4_write_community_06.wr_name, g4_write_community_06.wr_email, g4_write_community_06.wr_homepage, g4_write_community_06.wr_datetime, g4_write_community_06.wr_1, g4_write_community_06.wr_2, g4_write_community_06.wr_3, g4_write_community_06.wr_4, g4_write_community_06.wr_5, g4_write_community_06.wr_6, g4_write_community_06.wr_7, g4_write_community_06.wr_8, g4_write_community_06.wr_9, g4_write_community_06.wr_10 from g4_write_community_06 where wr_is_comment=0     UNION ALL  select 'community_07' as bo_table, g4_write_community_07.wr_id, g4_write_community_07.wr_parent, g4_write_community_07.wr_num, g4_write_community_07.wr_reply, g4_write_community_07.wr_comment, g4_write_community_0! 7.wr_option, g4_write_community_07.wr_subject, g4_write_community_07.wr_content, g4_write_community_07.wr_link1, g4_write_community_07.wr_link2, g4_write_community_07.wr_link1_hit, g4_write_community_07.wr_link2_hit, g4_write_community_07.wr_hit, g4_write_community_07.wr_good, g4_write_community_07.wr_nogood, g4_write_community_07.mb_id, g4_write_community_07.wr_name, g4_write_community_07.wr_email, g4_write_community_07.wr_homepage, g4_write_community_07.wr_datetime, g4_write_community_07.wr_1, g4_write_community_07.wr_2, g4_write_community_07.wr_3, g4_write_community_07.wr_4, g4_write_community_07.wr_5, g4_write_community_07.wr_6, g4_write_community_07.wr_7, g4_write_community_07.wr_8, g4_write_community_07.wr_9, g4_write_community_07.wr_10 from g4_write_community_07 where wr_is_comment=0     UNION ALL  select 'community_08' as bo_table, g4_write_community_08.wr_id, g4_write_community_08.wr_parent, g4_write_community_08.wr_num, g4_write_community_08.wr_repl! y, g4_write_community_08.wr_comment, g4_write_community_08.wr_! option, g4_write_community_08.wr_subject, g4_write_community_08.wr_content, g4_write_community_08.wr_link1, g4_write_community_08.wr_link2, g4_write_community_08.wr_link1_hit, g4_write_community_08.wr_link2_hit, g4_write_community_08.wr_hit, g4_write_community_08.wr_good, g4_write_community_08.wr_nogood, g4_write_community_08.mb_id, g4_write_community_08.wr_name, g4_write_community_08.wr_email, g4_write_community_08.wr_homepage, g4_write_community_08.wr_datetime, g4_write_community_08.wr_1, g4_write_community_08.wr_2, g4_write_community_08.wr_3, g4_write_community_08.wr_4, g4_write_community_08.wr_5, g4_write_community_08.wr_6, g4_write_community_08.wr_7, g4_write_community_08.wr_8, g4_write_community_08.wr_9, g4_write_community_08.wr_10 from g4_write_community_08 where wr_is_comment=0     UNION ALL  select 'brains_01' as bo_table, g4_write_brains_01.wr_id, g4_write_brains_01.wr_parent, g4_write_brains_01.wr_num, g4_write_brains_01.wr_reply, g4_write_brains_01.wr_comm! ent, g4_write_brains_01.wr_option, g4_write_brains_01.wr_subject, g4_write_brains_01.wr_content, g4_write_brains_01.wr_link1, g4_write_brains_01.wr_link2, g4_write_brains_01.wr_link1_hit, g4_write_brains_01.wr_link2_hit, g4_write_brains_01.wr_hit, g4_write_brains_01.wr_good, g4_write_brains_01.wr_nogood, g4_write_brains_01.mb_id, g4_write_brains_01.wr_name, g4_write_brains_01.wr_email, g4_write_brains_01.wr_homepage, g4_write_brains_01.wr_datetime, g4_write_brains_01.wr_1, g4_write_brains_01.wr_2, g4_write_brains_01.wr_3, g4_write_brains_01.wr_4, g4_write_brains_01.wr_5, g4_write_brains_01.wr_6, g4_write_brains_01.wr_7, g4_write_brains_01.wr_8, g4_write_brains_01.wr_9, g4_write_brains_01.wr_10 from g4_write_brains_01 where wr_is_comment=0     UNION ALL  select 'brains_02' as bo_table, g4_write_brains_02.wr_id, g4_write_brains_02.wr_parent, g4_write_brains_02.wr_num, g4_write_brains_02.wr_reply, g4_write_brains_02.wr_comment, g4_write_brains_02.wr_option, g4_w! rite_brains_02.wr_subject, g4_write_brains_02.wr_content, g4_w! rite_bra ins_02.wr_link1, g4_write_brains_02.wr_link2, g4_write_brains_02.wr_link1_hit, g4_write_brains_02.wr_link2_hit, g4_write_brains_02.wr_hit, g4_write_brains_02.wr_good, g4_write_brains_02.wr_nogood, g4_write_brains_02.mb_id, g4_write_brains_02.wr_name, g4_write_brains_02.wr_email, g4_write_brains_02.wr_homepage, g4_write_brains_02.wr_datetime, g4_write_brains_02.wr_1, g4_write_brains_02.wr_2, g4_write_brains_02.wr_3, g4_write_brains_02.wr_4, g4_write_brains_02.wr_5, g4_write_brains_02.wr_6, g4_write_brains_02.wr_7, g4_write_brains_02.wr_8, g4_write_brains_02.wr_9, g4_write_brains_02.wr_10 from g4_write_brains_02 where wr_is_comment=0     UNION ALL  select 'brains_03' as bo_table, g4_write_brains_03.wr_id, g4_write_brains_03.wr_parent, g4_write_brains_03.wr_num, g4_write_brains_03.wr_reply, g4_write_brains_03.wr_comment, g4_write_brains_03.wr_option, g4_write_brains_03.wr_subject, g4_write_brains_03.wr_content, g4_write_brains_03.wr_link1, g4_write_brains_03.wr_l! ink2, g4_write_brains_03.wr_link1_hit, g4_write_brains_03.wr_link2_hit, g4_write_brains_03.wr_hit, g4_write_brains_03.wr_good, g4_write_brains_03.wr_nogood, g4_write_brains_03.mb_id, g4_write_brains_03.wr_name, g4_write_brains_03.wr_email, g4_write_brains_03.wr_homepage, g4_write_brains_03.wr_datetime, g4_write_brains_03.wr_1, g4_write_brains_03.wr_2, g4_write_brains_03.wr_3, g4_write_brains_03.wr_4, g4_write_brains_03.wr_5, g4_write_brains_03.wr_6, g4_write_brains_03.wr_7, g4_write_brains_03.wr_8, g4_write_brains_03.wr_9, g4_write_brains_03.wr_10 from g4_write_brains_03 where wr_is_comment=0     UNION ALL  select 'brains_04' as bo_table, g4_write_brains_04.wr_id, g4_write_brains_04.wr_parent, g4_write_brains_04.wr_num, g4_write_brains_04.wr_reply, g4_write_brains_04.wr_comment, g4_write_brains_04.wr_option, g4_write_brains_04.wr_subject, g4_write_brains_04.wr_content, g4_write_brains_04.wr_link1, g4_write_brains_04.wr_link2, g4_write_brains_04.wr_link1_hit, ! g4_write_brains_04.wr_link2_hit, g4_write_brains_04.wr_hit, g4! _write_b rains_04.wr_good, g4_write_brains_04.wr_nogood, g4_write_brains_04.mb_id, g4_write_brains_04.wr_name, g4_write_brains_04.wr_email, g4_write_brains_04.wr_homepage, g4_write_brains_04.wr_datetime, g4_write_brains_04.wr_1, g4_write_brains_04.wr_2, g4_write_brains_04.wr_3, g4_write_brains_04.wr_4, g4_write_brains_04.wr_5, g4_write_brains_04.wr_6, g4_write_brains_04.wr_7, g4_write_brains_04.wr_8, g4_write_brains_04.wr_9, g4_write_brains_04.wr_10 from g4_write_brains_04 where wr_is_comment=0     UNION ALL  select 'brains_05' as bo_table, g4_write_brains_05.wr_id, g4_write_brains_05.wr_parent, g4_write_brains_05.wr_num, g4_write_brains_05.wr_reply, g4_write_brains_05.wr_comment, g4_write_brains_05.wr_option, g4_write_brains_05.wr_subject, g4_write_brains_05.wr_content, g4_write_brains_05.wr_link1, g4_write_brains_05.wr_link2, g4_write_brains_05.wr_link1_hit, g4_write_brains_05.wr_link2_hit, g4_write_brains_05.wr_hit, g4_write_brains_05.wr_good, g4_write_brains_05.wr_! nogood, g4_write_brains_05.mb_id, g4_write_brains_05.wr_name, g4_write_brains_05.wr_email, g4_write_brains_05.wr_homepage, g4_write_brains_05.wr_datetime, g4_write_brains_05.wr_1, g4_write_brains_05.wr_2, g4_write_brains_05.wr_3, g4_write_brains_05.wr_4, g4_write_brains_05.wr_5, g4_write_brains_05.wr_6, g4_write_brains_05.wr_7, g4_write_brains_05.wr_8, g4_write_brains_05.wr_9, g4_write_brains_05.wr_10 from g4_write_brains_05 where wr_is_comment=0     UNION ALL  select 'brains_06' as bo_table, g4_write_brains_06.wr_id, g4_write_brains_06.wr_parent, g4_write_brains_06.wr_num, g4_write_brains_06.wr_reply, g4_write_brains_06.wr_comment, g4_write_brains_06.wr_option, g4_write_brains_06.wr_subject, g4_write_brains_06.wr_content, g4_write_brains_06.wr_link1, g4_write_brains_06.wr_link2, g4_write_brains_06.wr_link1_hit, g4_write_brains_06.wr_link2_hit, g4_write_brains_06.wr_hit, g4_write_brains_06.wr_good, g4_write_brains_06.wr_nogood, g4_write_brains_06.mb_id, g4_wr! ite_brains_06.wr_name, g4_write_brains_06.wr_email, g4_write_b! rains_06 .wr_homepage, g4_write_brains_06.wr_datetime, g4_write_brains_06.wr_1, g4_write_brains_06.wr_2, g4_write_brains_06.wr_3, g4_write_brains_06.wr_4, g4_write_brains_06.wr_5, g4_write_brains_06.wr_6, g4_write_brains_06.wr_7, g4_write_brains_06.wr_8, g4_write_brains_06.wr_9, g4_write_brains_06.wr_10 from g4_write_brains_06 where wr_is_comment=0     UNION ALL  select 'brains_07' as bo_table, g4_write_brains_07.wr_id, g4_write_brains_07.wr_parent, g4_write_brains_07.wr_num, g4_write_brains_07.wr_reply, g4_write_brains_07.wr_comment, g4_write_brains_07.wr_option, g4_write_brains_07.wr_subject, g4_write_brains_07.wr_content, g4_write_brains_07.wr_link1, g4_write_brains_07.wr_link2, g4_write_brains_07.wr_link1_hit, g4_write_brains_07.wr_link2_hit, g4_write_brains_07.wr_hit, g4_write_brains_07.wr_good, g4_write_brains_07.wr_nogood, g4_write_brains_07.mb_id, g4_write_brains_07.wr_name, g4_write_brains_07.wr_email, g4_write_brains_07.wr_homepage, g4_write_brains_07.wr_date! time, g4_write_brains_07.wr_1, g4_write_brains_07.wr_2, g4_write_brains_07.wr_3, g4_write_brains_07.wr_4, g4_write_brains_07.wr_5, g4_write_brains_07.wr_6, g4_write_brains_07.wr_7, g4_write_brains_07.wr_8, g4_write_brains_07.wr_9, g4_write_brains_07.wr_10 from g4_write_brains_07 where wr_is_comment=0     UNION ALL  select 'brains_08' as bo_table, g4_write_brains_08.wr_id, g4_write_brains_08.wr_parent, g4_write_brains_08.wr_num, g4_write_brains_08.wr_reply, g4_write_brains_08.wr_comment, g4_write_brains_08.wr_option, g4_write_brains_08.wr_subject, g4_write_brains_08.wr_content, g4_write_brains_08.wr_link1, g4_write_brains_08.wr_link2, g4_write_brains_08.wr_link1_hit, g4_write_brains_08.wr_link2_hit, g4_write_brains_08.wr_hit, g4_write_brains_08.wr_good, g4_write_brains_08.wr_nogood, g4_write_brains_08.mb_id, g4_write_brains_08.wr_name, g4_write_brains_08.wr_email, g4_write_brains_08.wr_homepage, g4_write_brains_08.wr_datetime, g4_write_brains_08.wr_1, g4_write! _brains_08.wr_2, g4_write_brains_08.wr_3, g4_write_brains_08.w! r_4, g4_ write_brains_08.wr_5, g4_write_brains_08.wr_6, g4_write_brains_08.wr_7, g4_write_brains_08.wr_8, g4_write_brains_08.wr_9, g4_write_brains_08.wr_10 from g4_write_brains_08 where wr_is_comment=0     ) as a order by  wr_datetime desc  limit 0, 10 |         0 |        187985 |     25723 |

| 121 | radhika78   | localhost | radhika78   | Query   |    1 | Waiting for table level lock | update g4_write_brains_06 set wr_hit = wr_hit + 1 where wr_id = '6574'      

 

 

#DB

이 질문에 댓글 쓰기 :

답변 1

당연히 위와 같은 쿼리면 슈퍼컴퓨터 애비(?)를 쓰더라도 서버 뻗습니다.

 

쿼리 튜닝을 하셔야 할듯하고 위와같이 왜 쿼리 날려야 하는지부터 문제점 찾아가셔야 해답을 찾으 실 수 있으실겁니다.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
filter #DB ×
전체 834
© SIRSOFT
현재 페이지 제일 처음으로