explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cYUS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 12.066 ↓ 4.3 996 1

Nested Loop Semi Join (cost=60.49..16,972.46 rows=234 width=4) (actual time=1.111..12.066 rows=996 loops=1)

2. 0.539 10.135 ↓ 4.3 996 1

Nested Loop Semi Join (cost=60.07..15,588.57 rows=234 width=8) (actual time=1.100..10.135 rows=996 loops=1)

3. 0.862 1.100 ↓ 1.5 2,832 1

Bitmap Heap Scan on t166_userrolehierarchy (cost=59.64..6,841.91 rows=1,861 width=8) (actual time=0.270..1.100 rows=2,832 loops=1)

  • Recheck Cond: ((c663_ancestor_role_id = 237422) AND (end_stamp = '32503680000000'::bigint))
  • Heap Blocks: exact=312
4. 0.238 0.238 ↓ 1.6 2,894 1

Bitmap Index Scan on ix_t166_userrolehierarchy_ancestor_end_start_timestamp (cost=0.00..59.17 rows=1,861 width=0) (actual time=0.238..0.238 rows=2,894 loops=1)

  • Index Cond: ((c663_ancestor_role_id = 237422) AND (end_stamp = '32503680000000'::bigint))
5. 8.496 8.496 ↓ 0.0 0 2,832

Index Only Scan using ix_distinctclosedateowner_owner_closedate on distinctclosedateowner (cost=0.43..24.22 rows=6 width=4) (actual time=0.003..0.003 rows=0 loops=2,832)

  • Index Cond: ((ownerid = t166_userrolehierarchy.sid) AND (closedate <= 20190131) AND (closedate >= 20181101))
  • Heap Fetches: 996
6. 1.992 1.992 ↑ 1.0 1 996

Index Scan using ix_t67_userroledim_sid_timestamp_partial on t67_userroledim (cost=0.42..5.90 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=996)

  • Index Cond: ((sid = t166_userrolehierarchy.c662_user_role_id) AND (end_stamp = '32503680000000'::bigint))
  • Filter: ((NOT deleted) AND (sid <> '-2'::integer))