Forum OpenACS Development: Re: calendar in .LRN really slow

Collapse
Posted by Bernt Pettersen on
Well, I installed ACS Dev Support.

And it only confirms my qualified guessing;

Request Processor

  • +1.6 ms: Applied transformation from /web/uib-staging/www / dotlrn/ -> ? - 1.6 ms
  • +5.2 ms: Served file /web/uib-staging/packages/dotlrn/www/index.adp with adp_parse_ad_conn_file - 12357.8 ms
  • +12363.9 ms: Applied GET filter: (for /dotlrn/ ds_trace_filter) - 1.6 ms
    • returned filter_ok

All but this db-request are 0-8 ms...

11621 ms  	  pool2  	dbqd.calendar.tcl.calendar-display-procs.calendar::one_day_display.select_day_items: select nsdb0

	select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date,
         to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date,
         nvl(e.name, a.name) as name,
         nvl(e.status_summary, a.status_summary) as status_summary,
         e.event_id as item_id,
         (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type,
	 on_which_calendar as calendar_id,
	 (select calendar_name from calendars 
	 where calendar_id = on_which_calendar)
	 as calendar_name,
         to_char(timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format)),'YYYY-MM-DD HH24:MI:SS') as start_interval,
         to_char(timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format) + (24 - 1/3600)/24),'YYYY-MM-DD HH24:MI:SS')  as end_interval
from     acs_activities a,
         acs_events e,
         timespans s,
         time_intervals t,
         cal_items
where    e.timespan_id = s.timespan_id
and      s.interval_id = t.interval_id
and      e.activity_id = a.activity_id
and      start_date between
         timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format)) and
         timezone.local_to_utc(timezone.get_id(:timezone),to_date(:current_date,:date_format) + (24 - 1/3600)/24)
and     cal_items.cal_item_id= e.event_id
and      e.event_id
in       (
         select  cal_item_id
         from    cal_items
         where   on_which_calendar in (1586,18243,18478,981405,983051,1141981,983359,878911,392985,1032333,139824,1301790,890307,3050564,1235418)
         )