From: jstimmsj <smi...@gm...> - 2012-08-29 13:55:21
|
One other tidbit. Here's an example of the slow query being run. This example only took 17s but it can go up to 2 or more minutes: # Time: 120829 9:44:31 # User@Host: egroupware[egroupware] @ localhost [] # Query_time: 17 Lock_time: 0 Rows_sent: 201 Rows_examined: 7885772 use egroupware; (SELECT egw_cal_repeats.recur_type,egw_cal_repeats.recur_enddate,egw_cal_repeats.recur_interval,egw_cal_repeats.recur_data,egw_cal_repeats.recur_exception,egw_cal.cal_id,cal_uid,cal_owner,cal_category,cal_modified,cal_priority,cal_public,cal_title,cal_description,cal_location,cal_reference,cal_modifier,cal_non_blocking,cal_special,cal_etag,cal_creator,cal_created,cal_recurrence,tz_id,cal_deleted,caldav_name,MIN(cal_start) AS cal_start,MIN(cal_end) AS cal_end,egw_cal_user.cal_recur_date,NULL AS participants,NULL AS icons FROM egw_cal JOIN egw_cal_dates ON egw_cal.cal_id=egw_cal_dates.cal_id JOIN egw_cal_user ON egw_cal.cal_id=egw_cal_user.cal_id LEFT JOIN egw_cal_repeats ON egw_cal.cal_id=egw_cal_repeats.cal_id LEFT JOIN egw_cal_user rejected_by_user ON egw_cal.cal_id=rejected_by_user.cal_id AND rejected_by_user.cal_user_type='u' AND rejected_by_user.cal_user_id='14' AND (recur_type IS NULL AND rejected_by_user.cal_recur_date=0 OR cal_start=rejected_by_user.cal_recur_date) WHERE cal_reference=0 AND cal_deleted IS NULL AND egw_cal_user.cal_status!='X' AND 1337607854 < (CASE WHEN recur_type IS NULL THEN cal_end ELSE (CASE WHEN recur_enddate!=0 THEN recur_enddate ELSE 9999999999 END) END) AND egw_cal_user.cal_recur_date=0 AND cal_start < 1377783854 AND (rejected_by_user.cal_status IS NULL OR rejected_by_user.cal_status NOT IN ('R','X') OR cal_owner=14) AND egw_cal_user.cal_user_type='u' AND egw_cal_user.cal_user_id IN ('14','-26','-84','-76','-86','-46','-1','-124') GROUP BY egw_cal_repeats.recur_type,egw_cal_repeats.recur_enddate,egw_cal_repeats.recur_interval,egw_cal_repeats.recur_data,egw_cal_repeats.recur_exception,egw_cal.cal_id,cal_uid,cal_owner,cal_category,cal_modified,cal_priority,cal_public,cal_title,cal_description,cal_location,cal_reference,cal_modifier,cal_non_blocking,cal_special,cal_etag,cal_creator,cal_created,cal_recurrence,tz_id,cal_deleted,caldav_name,egw_cal_user.cal_recur_date) UNION (SELECT egw_cal_repeats.recur_type,egw_cal_repeats.recur_enddate,egw_cal_repeats.recur_interval,egw_cal_repeats.recur_data,egw_cal_repeats.recur_exception,egw_cal.cal_id,cal_uid,cal_owner,cal_category,cal_modified,cal_priority,cal_public,cal_title,cal_description,cal_location,cal_reference,cal_modifier,cal_non_blocking,cal_special,cal_etag,cal_creator,cal_created,cal_recurrence,tz_id,cal_deleted,caldav_name,MIN(cal_start) AS cal_start,MIN(cal_end) AS cal_end,egw_cal_user.cal_recur_date,NULL AS participants,NULL AS icons FROM egw_cal JOIN egw_cal_dates ON egw_cal.cal_id=egw_cal_dates.cal_id JOIN egw_cal_user ON egw_cal.cal_id=egw_cal_user.cal_id LEFT JOIN egw_cal_repeats ON egw_cal.cal_id=egw_cal_repeats.cal_id LEFT JOIN egw_cal_user rejected_by_user ON egw_cal.cal_id=rejected_by_user.cal_id AND rejected_by_user.cal_user_type='u' AND rejected_by_user.cal_user_id='14' AND (recur_type IS NULL AND rejected_by_user.cal_recur_date=0 OR cal_start=rejected_by_user.cal_recur_date) WHERE cal_reference=0 AND cal_deleted IS NULL AND egw_cal_user.cal_status!='X' AND 1337607854 < (CASE WHEN recur_type IS NULL THEN cal_end ELSE (CASE WHEN recur_enddate!=0 THEN recur_enddate ELSE 9999999999 END) END) AND egw_cal_user.cal_recur_date=0 AND cal_start < 1377783854 AND (rejected_by_user.cal_status IS NULL OR rejected_by_user.cal_status NOT IN ('R','X') OR cal_owner=14) AND cal_owner IN (14,-26,-84,-76,-86,-46,-1,-124) GROUP BY egw_cal_repeats.recur_type,egw_cal_repeats.recur_enddate,egw_cal_repeats.recur_interval,egw_cal_repeats.recur_data,egw_cal_repeats.recur_exception,egw_cal.cal_id,cal_uid,cal_owner,cal_category,cal_modified,cal_priority,cal_public,cal_title,cal_description,cal_location,cal_reference,cal_modifier,cal_non_blocking,cal_special,cal_etag,cal_creator,cal_created,cal_recurrence,tz_id,cal_deleted,caldav_name,egw_cal_user.cal_recur_date) ORDER BY cal_start LIMIT 0,500; -- View this message in context: http://egroupware.219119.n3.nabble.com/Calendar-app-slow-when-adding-editing-events-tp3985553p3985555.html Sent from the egroupware-users mailing list archive at Nabble.com. |