explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hJHY

Settings
# exclusive inclusive rows x rows loops node
1. 0.080 2.021 ↑ 1.6 234 1

Sort (cost=3,463.91..3,464.85 rows=374 width=77) (actual time=2.011..2.021 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.982 ↑ 1.0 20 1

Limit (cost=3,021.30..3,021.71 rows=20 width=16) (actual time=0.973..0.982 rows=20 loops=1)

4.          

Initplan (for Limit)

5. 0.002 0.012 ↑ 246.0 1 1

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

6. 0.004 0.004 ↑ 364.0 1 1

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

  • Filter: ((end_stamp = '32503680000000'::bigint) AND (c4815_ancestor_role_id = 12))
  • Rows Removed by Filter: 4
7. 0.006 0.006 ↑ 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.006..0.006 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.980 ↑ 51.9 20 1

GroupAggregate (cost=3,019.23..3,040.25 rows=1,038 width=16) (actual time=0.973..0.980 rows=20 loops=1)

  • Group Key: t2273_meetingactivityaccountfact.c8986_activitydate, t2273_meetingactivityaccountfact.c8992_activitychecksum
10. 0.284 0.972 ↑ 34.3 31 1

Sort (cost=3,019.23..3,021.89 rows=1,064 width=16) (actual time=0.970..0.972 rows=31 loops=1)

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

Result (cost=40.26..2,965.73 rows=1,064 width=16) (actual time=0.100..0.688 rows=1,298 loops=1)

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

Bitmap Heap Scan on t2273_meetingactivityaccountfact (cost=40.26..2,965.73 rows=1,064 width=16) (actual time=0.087..0.568 rows=1,298 loops=1)

  • Recheck Cond: ((c9010_accountid = 123) AND (end_stamp = '32503680000000'::bigint))
  • Filter: ((NOT deleted) AND c8998_isshared AND (c8986_activitydate >= '1561532400000'::bigint) AND (c8986_activitydate < '1593241200000'::bigint))
  • Rows Removed by Filter: 552
  • Heap Blocks: exact=141
13. 0.068 0.068 ↓ 1.2 1,850 1

Bitmap Index Scan on t2273_meetingactivityaccountfact_917_ptimestamp (cost=0.00..39.99 rows=1,543 width=0) (actual time=0.067..0.068 rows=1,850 loops=1)

  • Index Cond: (c9010_accountid = 123)
14. 0.171 1.941 ↑ 1.6 234 1

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

15. 0.045 1.302 ↑ 1.6 234 1

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

16. 0.020 1.077 ↑ 1.0 20 1

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

17. 0.008 0.997 ↑ 1.0 20 1

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

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

CTE Scan on activity_id_cte cte0 (cost=0.00..0.40 rows=20 width=4) (actual time=0.975..0.989 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.045 ms
Execution time : 2.141 ms