[CalendarServer-changes] [6890] CalendarServer/trunk/txdav/common/datastore/sql_legacy.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 4 19:43:14 PST 2011
Revision: 6890
http://trac.macosforge.org/projects/calendarserver/changeset/6890
Author: cdaboo at apple.com
Date: 2011-02-04 19:43:13 -0800 (Fri, 04 Feb 2011)
Log Message:
-----------
Change join order on freebusy query to improve performance.
Modified Paths:
--------------
CalendarServer/trunk/txdav/common/datastore/sql_legacy.py
Modified: CalendarServer/trunk/txdav/common/datastore/sql_legacy.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_legacy.py 2011-02-05 02:16:05 UTC (rev 6889)
+++ CalendarServer/trunk/txdav/common/datastore/sql_legacy.py 2011-02-05 03:43:13 UTC (rev 6890)
@@ -799,7 +799,7 @@
self.TIMESPANTEST = "((TIME_RANGE.FLOATING = FALSE AND TIME_RANGE.START_DATE < %s AND TIME_RANGE.END_DATE > %s) OR (TIME_RANGE.FLOATING = TRUE AND TIME_RANGE.START_DATE < %s AND TIME_RANGE.END_DATE > %s))"
self.TIMESPANTEST_NOEND = "((TIME_RANGE.FLOATING = FALSE AND TIME_RANGE.END_DATE > %s) OR (TIME_RANGE.FLOATING = TRUE AND TIME_RANGE.END_DATE > %s))"
self.TIMESPANTEST_NOSTART = "((TIME_RANGE.FLOATING = FALSE AND TIME_RANGE.START_DATE < %s) OR (TIME_RANGE.FLOATING = TRUE AND TIME_RANGE.START_DATE < %s))"
- self.TIMESPANTEST_TAIL_PIECE = " AND TIME_RANGE.CALENDAR_OBJECT_RESOURCE_ID = CALENDAR_OBJECT.RESOURCE_ID AND CALENDAR_OBJECT.CALENDAR_RESOURCE_ID = %s"
+ self.TIMESPANTEST_TAIL_PIECE = " AND TIME_RANGE.CALENDAR_OBJECT_RESOURCE_ID = CALENDAR_OBJECT.RESOURCE_ID AND TIME_RANGE.CALENDAR_RESOURCE_ID = %s"
self.TIMESPANTEST_JOIN_ON_PIECE = "TIME_RANGE.INSTANCE_ID = TRANSPARENCY.TIME_RANGE_INSTANCE_ID AND TRANSPARENCY.USER_ID = %s"
super(postgresqlgenerator, self).__init__(expr, calendarid, userid)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110204/7b1e8729/attachment.html>
More information about the calendarserver-changes
mailing list