سلام ، آیا این بازدید اول شماست ؟ یا
تبلیغات در این انجمن سفارش تبلیغات
نمایش نتایج: از شماره 1 تا 4 , از مجموع 4

موضوع: کوئری‌های سنگین دیتابیس

  1. #1

    تاریخ عضویت
    Apr 2011
    محل سکونت
    tehran
    نوشته ها
    29
    تشکر
    5
    تشکر شده 3 بار در 2 ارسال

    کوئری‌های سنگین دیتابیس

    سلام دوستان

    امروز هاستینگی که سایت من روش قرار داره بهم یه اخطار داده و گفته سایتتون کوئری‌های سنگین و طولانی مدت (بالای ده ثانیه) روی دیتابیس میزنه
    من از جوملا ۲.۵ استفاده می کنم و کش جوملا رو هم فعال کردم، از اوپتیمایز و ریپیر mysql هم استفاده کردم اما تاثیر چندانی نداشت
    اگه میشه راهنمایی کنید

    کد:
    # Query_time: 9.876915 Lock_time: 0.000301 Rows_sent: 30 Rows_examined: 110760
    --------------
    
    
    # Time: 140315 13:14:02
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 9.876915 Lock_time: 0.000301 Rows_sent: 30 Rows_examined: 110760
    use s_fa;
    SET timestamp=1394876642;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:43:52')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:43:52')
    ORDER BY a.created DESC LIMIT 30;
    # Time: 140315 13:14:03
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 10.258272 Lock_time: 0.000246 Rows_sent: 30 Rows_examined: 110760
    SET timestamp=1394876643;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:43:52')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:43:52')
    ORDER BY a.created DESC LIMIT 30;
    # Time: 140315 13:14:08
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 3.077208 Lock_time: 0.000147 Rows_sent: 30 Rows_examined: 110760
    SET timestamp=1394876648;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:44:05')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:44:05')
    ORDER BY a.created DESC LIMIT 30;
    
    
    
    
    ----------------
    # Query_time: 3.730601 Lock_time: 0.000146 Rows_sent: 30 Rows_examined: 110760
    ----------------
    
    
    # Time: 140315 13:14:11
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 3.730601 Lock_time: 0.000146 Rows_sent: 30 Rows_examined: 110760
    SET timestamp=1394876651;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:44:07')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:44:07')
    ORDER BY a.created DESC LIMIT 30;
    # Time: 140315 13:14:16
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 5.592167 Lock_time: 0.000175 Rows_sent: 30 Rows_examined: 110760
    SET timestamp=1394876656;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:44:11')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:44:11')
    ORDER BY a.created DESC LIMIT 30;
    
    
    -------------
    # Query_time: 4.519286 Lock_time: 0.000145 Rows_sent: 30 Rows_examined: 110760
    -------------
    
    
    
    
    # Time: 140315 13:14:23
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 4.519286 Lock_time: 0.000145 Rows_sent: 30 Rows_examined: 110760
    SET timestamp=1394876663;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:44:18')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:44:18')
    ORDER BY a.created DESC LIMIT 30;
    # Time: 140315 13:14:24
    # [email protected]: s_fa[s_fa] @ localhost []
    # Query_time: 3.725389 Lock_time: 0.000180 Rows_sent: 30 Rows_examined: 110760
    SET timestamp=1394876664;
    SELECT DISTINCT u.id as userid, IFNULL(c.id,a.catid) as catid, a.sectionid as secid, a.id as id, a.*, a.introtext as itext, a.fulltext as mtext, u.name AS author, u.usertype, u.email as authorEmail, a.created_by_alias as authorAlias, a.created AS dsdate, a.modified as updated, c.title as catName, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as catslug
    FROM jos_content AS a
    LEFT JOIN jos_users AS u ON u.id = a.created_by
    LEFT JOIN `jos_categories` AS c on c.id = a.catid
    WHERE a.state='1'
    AND IFNULL(c.id,0) IN (80,87,108,109,110,94,95,84,88,90,96,81,83,93,97,99,85,91,92,98,100,101,107,102,82,86,89,103,104,105)
    AND (a.access = 1 OR a.access = 5)
    AND (c.access = 1 OR c.access = 5)
    AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2014-03-15 09:44:21')
    AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2014-03-15 09:44:21')
    ORDER BY a.created DESC LIMIT 30;
    ویرایش توسط farhadst : 03-15-2014 در ساعت 12:04 PM

    جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.


  2. # ADS
    تبلیغات در جوملا فارسی
    تاریخ عضویت
    Always
    محل سکونت
    Advertising world
    نوشته ها
    Many
     

  3. #2

    تاریخ عضویت
    Apr 2012
    نوشته ها
    47
    تشکر
    4
    تشکر شده 14 بار در 14 ارسال
    ادرس سایتو میزاشتی

    احتمالا صفحه ای داری 30 تا مطلبو کامل نمایش میده
    اگه نه که افزونه ای این کارو میکنه
    پیدا کن کدومه تعدادشو کمتر کن و بزار رو نماش خلاصه مطلب
    اگه افزونس کلا پاکش کن یه چیز دیگه بجاش نصب کن یه خورده بد نوشته شده بعید میدونم برای خود جوملا باشه

    جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.


  4. کاربر مقابل از enb121 عزیز به خاطر این پست مفید تشکر کرده است:


  5. #3

    تاریخ عضویت
    Aug 2009
    محل سکونت
    Afghanistan - Herat
    نوشته ها
    2,445
    تشکر
    1,026
    تشکر شده 450 بار در 357 ارسال
    سلام. صفحه نخست سایت شما مقادیر زیادی رو داره فراخونی می کنه. چه افزونه هایی توی صفحه ی اولتون فعال هست؟

    جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.


  6. کاربر مقابل از torghoundy عزیز به خاطر این پست مفید تشکر کرده است:


  7. #4

    تاریخ عضویت
    Apr 2011
    محل سکونت
    tehran
    نوشته ها
    29
    تشکر
    5
    تشکر شده 3 بار در 2 ارسال
    سلام
    با غیرفعال کردن و تست به این نتیجه رسیدیم که مشکل از کامپوننت ninjarsssyndicator هستش که برای خروجی کلی سایت استفاده میشد
    با غیرفعال کردن این کامپوننت فعلا از پشتیبانی هاستینگ گفتن که مشکل برطرف شده
    متشکر از همه دوستان

    جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.


موضوعات مشابه

  1. 1 مشکل در تنظیمات دیتابیس(اتصال به دیتابیس)
    توسط mohammad1373 در انجمن نصب جوملا 2.5 فارسی
    پاسخ ها: 2
    آخرين نوشته: 03-17-2012, 05:23 PM
  2. مشکل گرفتن بک آپ از دیتابیس جی فرم
    توسط azam_a در انجمن کامپوننت های جوملا 1.5 فارسی
    پاسخ ها: 1
    آخرين نوشته: 02-25-2012, 08:10 AM
  3. عدم برقراری ارتباط جولا با دیتابیس
    توسط samaneh63 در انجمن سوالهای عمومی جوملا 1.7 فارسی
    پاسخ ها: 6
    آخرين نوشته: 02-19-2012, 03:17 PM
  4. پاسخ ها: 5
    آخرين نوشته: 12-07-2011, 01:26 PM
  5. مشکل در حجم فایل بک آپ دیتابیس
    توسط merkousha در انجمن مدیریت مامبو فارسی
    پاسخ ها: 3
    آخرين نوشته: 12-10-2008, 06:49 PM

علاقه مندی ها (Bookmarks)

علاقه مندی ها (Bookmarks)

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •