explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wKz9

Settings
# exclusive inclusive rows x rows loops node
1. 0.079 1.833 ↑ 1.6 234 1

Sort (cost=2,924.19..2,925.13 rows=374 width=77) (actual time=1.823..1.833 rows=234 loops=1)

  • Sort Key: t2264_meetingactivitydim.c8792_activitydate DESC NULLS LAST, (CASE WHEN (t2264_meetingactivitydim.c8772_activitysubject IS NULL) THEN ''::text ELSE t2264_meetingactivitydim.c8772_activitysubject END)
  • Sort Method: quicksort Memory: 54kB
2.          

CTE activity_id_cte

3. 0.000 0.787 ↑ 1.0 20 1

Limit (cost=2,481.58..2,481.99 rows=20 width=16) (actual time=0.779..0.787 rows=20 loops=1)

4.          

Initplan (for Limit)

5. 0.001 0.015 ↑ 246.0 1 1

Nested Loop (cost=0.14..237.78 rows=246 width=0) (actual time=0.015..0.015 rows=1 loops=1)

6. 0.005 0.005 ↑ 364.0 1 1

Seq Scan on t786_userrolehierarchy (cost=0.00..145.64 rows=364 width=4) (actual time=0.005..0.005 rows=1 loops=1)

  • Filter: ((end_stamp = '32503680000000'::bigint) AND (c4815_ancestor_role_id = 12))
  • Rows Removed by Filter: 4
7. 0.009 0.009 ↑ 1.0 1 1

Index Scan using idx_266_t859_userroledim_sid_end_stamp_start_stamp_null on t859_userroledim (cost=0.14..0.26 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: ((sid = t786_userrolehierarchy.c4812_user_role_id) AND (end_stamp = '32503680000000'::bigint))
  • Filter: ((NOT deleted) AND (sid <> '-2'::integer) AND ((c4994_portaltype IS NULL) OR (c4994_portaltype = 'None'::text)))
8. 0.000 0.000 ↓ 0.0 0

Seq Scan on t773_userdim (cost=0.00..65.67 rows=68 width=0) (never executed)

  • Filter: ((NOT deleted) AND (c4570_userroleid IS NULL) AND (sid <> '-2'::integer) AND (end_stamp = '32503680000000'::bigint) AND (c4581_usertype = 'Standard'::text))
9. 0.008 0.785 ↑ 51.9 20 1

GroupAggregate (cost=2,479.51..2,500.53 rows=1,038 width=16) (actual time=0.778..0.785 rows=20 loops=1)

  • Group Key: t2273_meetingactivityaccountfact.c8986_activitydate, t2273_meetingactivityaccountfact.c8992_activitychecksum
10. 0.292 0.777 ↑ 34.3 31 1

Sort (cost=2,479.51..2,482.17 rows=1,064 width=16) (actual time=0.776..0.777 rows=31 loops=1)

  • Sort Key: t2273_meetingactivityaccountfact.c8986_activitydate DESC NULLS LAST, t2273_meetingactivityaccountfact.c8992_activitychecksum
  • Sort Method: quicksort Memory: 109kB
11. 0.210 0.485 ↓ 1.2 1,298 1

Result (cost=58.44..2,426.02 rows=1,064 width=16) (actual time=0.122..0.485 rows=1,298 loops=1)

  • One-Time Filter: ($1 OR $2)
12. 0.180 0.275 ↓ 1.2 1,298 1

Bitmap Heap Scan on t2273_meetingactivityaccountfact (cost=58.44..2,426.02 rows=1,064 width=16) (actual time=0.105..0.275 rows=1,298 loops=1)

  • Recheck Cond: ((c9010_accountid = 123) AND (c8986_activitydate >= '1561532400000'::bigint) AND (c8986_activitydate < '1593241200000'::bigint) AND (end_stamp = '32503680000000'::bigint) AND c8998_isshared AND (NOT deleted))
  • Heap Blocks: exact=49
13. 0.095 0.095 ↓ 1.2 1,298 1

Bitmap Index Scan on idx_accountid_sentha (cost=0.00..58.17 rows=1,064 width=0) (actual time=0.095..0.095 rows=1,298 loops=1)

  • Index Cond: ((c9010_accountid = 123) AND (c8986_activitydate >= '1561532400000'::bigint) AND (c8986_activitydate < '1593241200000'::bigint) AND (end_stamp = '32503680000000'::bigint))
14. 0.181 1.754 ↑ 1.6 234 1

Nested Loop (cost=1.73..426.22 rows=374 width=77) (actual time=0.841..1.754 rows=234 loops=1)

15. 0.044 1.105 ↑ 1.6 234 1

Nested Loop (cost=1.30..203.52 rows=374 width=44) (actual time=0.829..1.105 rows=234 loops=1)

16. 0.019 0.881 ↑ 1.0 20 1

Nested Loop (cost=0.87..169.50 rows=20 width=44) (actual time=0.809..0.881 rows=20 loops=1)

17. 0.007 0.802 ↑ 1.0 20 1

HashAggregate (cost=0.45..0.65 rows=20 width=4) (actual time=0.799..0.802 rows=20 loops=1)

  • Group Key: cte0.c1
18. 0.795 0.795 ↑ 1.0 20 1

CTE Scan on activity_id_cte cte0 (cost=0.00..0.40 rows=20 width=4) (actual time=0.780..0.795 rows=20 loops=1)

19. 0.060 0.060 ↑ 1.0 1 20

Index Scan using idx_1809_t2264_meetingactivitydim_sid_end_stamp_start_stamp_nul on t2264_meetingactivitydim (cost=0.42..8.44 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=20)

  • Index Cond: ((sid = cte0.c1) AND (end_stamp = '32503680000000'::bigint))
  • Filter: (NOT deleted)
20. 0.180 0.180 ↑ 1.6 12 20

Index Scan using idx_activityid_sentha on t2286_meetingactivityparticipantsfact (cost=0.43..1.51 rows=19 width=8) (actual time=0.005..0.009 rows=12 loops=20)

  • Index Cond: ((c9160_activityid = t2264_meetingactivitydim.sid) AND (end_stamp = '32503680000000'::bigint))
  • Filter: (NOT deleted)
21. 0.468 0.468 ↑ 1.0 1 234

Index Scan using t2256_meetingactivityparticipantsdim_sidendstampunique on t2256_meetingactivityparticipantsdim (cost=0.43..0.60 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=234)

  • Index Cond: ((sid = t2286_meetingactivityparticipantsfact.sid) AND (end_stamp = '32503680000000'::bigint))
  • Filter: (NOT deleted)
Planning time : 2.099 ms
Execution time : 1.978 ms