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

Collapse
Posted by Bernt Pettersen on
YES!

I turned on indexes on time_intervals.start_date and time_intervals.end_date.

Now it runs like h*ll! 😊

no rows selected


Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=CHOOSE (Cost=52 Card=1 Bytes=145)
   1    0   NESTED LOOPS (Cost=52 Card=1 Bytes=145)
   2    1     NESTED LOOPS (Cost=51 Card=1 Bytes=133)
   3    2       HASH JOIN (Cost=50 Card=1 Bytes=65)
   4    3         HASH JOIN (Cost=39 Card=60 Bytes=3180)
   5    4           HASH JOIN (Cost=17 Card=73 Bytes=2117)
   6    5             TABLE ACCESS (BY INDEX ROWID) OF 'TIME_INTERVALS
          ' (Cost=6 Card=73 Bytes=1460)

   7    6               INDEX (RANGE SCAN) OF 'TIME_INTERVALS_START_DA
          TE_IDX' (NON-UNIQUE) (Cost=2 Card=73)

   8    5             TABLE ACCESS (FULL) OF 'TIMESPANS' (Cost=10 Card
          =14460 Bytes=130140)

   9    4           TABLE ACCESS (FULL) OF 'ACS_EVENTS' (Cost=21 Card=
          11940 Bytes=286560)

  10    3         TABLE ACCESS (FULL) OF 'CAL_ITEMS' (Cost=10 Card=150
           Bytes=1800)

  11    2       TABLE ACCESS (BY INDEX ROWID) OF 'ACS_ACTIVITIES' (Cos
          t=1 Card=3050 Bytes=207400)

  12   11         INDEX (UNIQUE SCAN) OF 'ACS_ACTIVITIES_PK' (UNIQUE)
  13    1     TABLE ACCESS (BY INDEX ROWID) OF 'CAL_ITEMS' (Cost=1 Car
          d=11670 Bytes=140040)

  14   13       INDEX (UNIQUE SCAN) OF 'CAL_ITEM_CAL_ITEM_ID_PK' (UNIQ
          UE)





Statistics
----------------------------------------------------------
         12  recursive calls
         21  db block gets
        300  consistent gets
          1  physical reads
          0  redo size
        716  bytes sent via SQL*Net to client
        319  bytes received via SQL*Net from client
          1  SQL*Net roundtrips to/from client
         20  sorts (memory)
          0  sorts (disk)
          0  rows processed