From 3a06bcb28597b97ba2e51f991014dab7ccf249f6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 18 Feb 2015 08:15:54 +0000 Subject: [PATCH] disabling dates_range_view in favor of using dates-table direct, as it appears 1.5-3 times quicker in two big installations I tested with --- calendar/inc/class.calendar_so.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index 33729f4f91..98645395a6 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -161,6 +161,9 @@ class calendar_so /** * Return sql to fetch all dates in a given timerange, to be used instead of full dates table in further sql queries * + * Currently NOT used, as using two views joined together appears slower in my tests (probably because no index) then + * joining cal_range_view with real dates table (with index). + * * @param int $start * @param int $end * @param array $_where =null @@ -848,7 +851,8 @@ class calendar_so // dates table join only needed to enum recuring events, we use a time-range limited view here too if ($params['enum_recuring']) { - $join = "JOIN ".$this->dates_range_view($start, $end, null, $filter == 'everything' ? null : $filter == 'deleted'). + $join = "JOIN ".$this->dates_table. // using dates_table direct seems quicker then an other view + //$this->dates_range_view($start, $end, null, $filter == 'everything' ? null : $filter == 'deleted'). " ON $this->cal_table.cal_id=$this->dates_table.cal_id ".$join; }