explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KwGC : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #g3ZrB; plan #Q7Oa; plan #FrV3; plan #cdqsn; plan #WtJs

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.002 0.351 ↓ 0.0 0 1

Delete on audit_evs_all aea (cost=0.67..575.30 rows=4 width=38) (actual time=0.345..0.351 rows=0 loops=1)

  • Delete on audit_evs_all_20200724 aea_1
  • Delete on audit_evs_all_20200725 aea_2
  • Delete on audit_evs_all_20200726 aea_3
  • Delete on audit_evs_all_default aea_4
2. 0.002 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.67..143.75 rows=1 width=38) (actual time=0.007..0.009 rows=0 loops=1)

  • Join Filter: (aea_1.audit_ev_id = aea2.audit_ev_id)
3. 0.007 0.007 ↓ 0.0 0 1

Index Scan using audit_evs_all_20200724_pkey on audit_evs_all_20200724 aea_1 (cost=0.12..3.14 rows=1 width=14) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
4. 0.000 0.000 ↓ 0.0 0

Subquery Scan on aea2 (cost=0.54..140.60 rows=1 width=40) (never executed)

5. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.54..140.59 rows=1 width=8) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.54..140.59 rows=1 width=8) (never executed)

  • Filter: (((aea_5.ev_id IS NOT NULL) AND (evs.ev_id IS NULL)) OR (aea_5.ev_id IS NULL))
7. 0.000 0.000 ↓ 0.0 0

Append (cost=0.12..116.03 rows=8 width=16) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200724_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200724 aea_5 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200725_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200725 aea_6 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
10. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on audit_evs_all_20200726 aea_7 (cost=4.25..106.56 rows=5 width=16) (never executed)

  • Recheck Cond: (((when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone) AND (ev_id IS NOT NULL)) OR (ev_id IS NULL))
  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
11. 0.000 0.000 ↓ 0.0 0

BitmapOr (cost=4.25..4.25 rows=71 width=0) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on audit_evs_all_20200726_when_created_idx (cost=0.00..1.83 rows=5 width=0) (never executed)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
13. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on audit_evs_all_20200726_ev_id_person_id_delivery_status_orde_idx (cost=0.00..2.41 rows=66 width=0) (never executed)

  • Index Cond: (ev_id IS NULL)
14. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_default_ev_id_person_id_delivery_status_order_idx on audit_evs_all_default aea_8 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using evs_ev_id_message_panel_id_idx on evs (cost=0.42..3.06 rows=1 width=8) (never executed)

  • Index Cond: (ev_id = aea_5.ev_id)
  • Heap Fetches: 0
16. 0.001 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.67..143.75 rows=1 width=38) (actual time=0.003..0.004 rows=0 loops=1)

  • Join Filter: (aea_2.audit_ev_id = aea2_1.audit_ev_id)
17. 0.003 0.003 ↓ 0.0 0 1

Index Scan using audit_evs_all_20200725_pkey on audit_evs_all_20200725 aea_2 (cost=0.12..3.14 rows=1 width=14) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
18. 0.000 0.000 ↓ 0.0 0

Subquery Scan on aea2_1 (cost=0.54..140.60 rows=1 width=40) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.54..140.59 rows=1 width=8) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.54..140.59 rows=1 width=8) (never executed)

  • Filter: (((aea_9.ev_id IS NOT NULL) AND (evs_1.ev_id IS NULL)) OR (aea_9.ev_id IS NULL))
21. 0.000 0.000 ↓ 0.0 0

Append (cost=0.12..116.03 rows=8 width=16) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200724_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200724 aea_9 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200725_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200725 aea_10 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
24. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on audit_evs_all_20200726 aea_11 (cost=4.25..106.56 rows=5 width=16) (never executed)

  • Recheck Cond: (((when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone) AND (ev_id IS NOT NULL)) OR (ev_id IS NULL))
  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
25. 0.000 0.000 ↓ 0.0 0

BitmapOr (cost=4.25..4.25 rows=71 width=0) (never executed)

26. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on audit_evs_all_20200726_when_created_idx (cost=0.00..1.83 rows=5 width=0) (never executed)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
27. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on audit_evs_all_20200726_ev_id_person_id_delivery_status_orde_idx (cost=0.00..2.41 rows=66 width=0) (never executed)

  • Index Cond: (ev_id IS NULL)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_default_ev_id_person_id_delivery_status_order_idx on audit_evs_all_default aea_12 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
29. 0.000 0.000 ↓ 0.0 0

Index Only Scan using evs_ev_id_message_panel_id_idx on evs evs_1 (cost=0.42..3.06 rows=1 width=8) (never executed)

  • Index Cond: (ev_id = aea_9.ev_id)
  • Heap Fetches: 0
30. 0.000 0.332 ↓ 0.0 0 1

Nested Loop (cost=0.96..144.04 rows=1 width=38) (actual time=0.330..0.332 rows=0 loops=1)

31. 0.001 0.332 ↓ 0.0 0 1

Subquery Scan on aea2_2 (cost=0.54..140.60 rows=1 width=40) (actual time=0.330..0.332 rows=0 loops=1)

32. 0.001 0.331 ↓ 0.0 0 1

Limit (cost=0.54..140.59 rows=1 width=8) (actual time=0.330..0.331 rows=0 loops=1)

33. 0.000 0.330 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.54..140.59 rows=1 width=8) (actual time=0.329..0.330 rows=0 loops=1)

  • Filter: (((aea_13.ev_id IS NOT NULL) AND (evs_2.ev_id IS NULL)) OR (aea_13.ev_id IS NULL))
34. 0.002 0.330 ↓ 0.0 0 1

Append (cost=0.12..116.03 rows=8 width=16) (actual time=0.329..0.330 rows=0 loops=1)

35. 0.003 0.003 ↓ 0.0 0 1

Index Scan using audit_evs_all_20200724_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200724 aea_13 (cost=0.12..3.14 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
36. 0.004 0.004 ↓ 0.0 0 1

Index Scan using audit_evs_all_20200725_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200725 aea_14 (cost=0.12..3.14 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
37. 0.147 0.317 ↓ 0.0 0 1

Bitmap Heap Scan on audit_evs_all_20200726 aea_15 (cost=4.25..106.56 rows=5 width=16) (actual time=0.317..0.317 rows=0 loops=1)

  • Recheck Cond: (((when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone) AND (ev_id IS NOT NULL)) OR (ev_id IS NULL))
  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
  • Rows Removed by Filter: 62
  • Heap Blocks: exact=53
38. 0.001 0.170 ↓ 0.0 0 1

BitmapOr (cost=4.25..4.25 rows=71 width=0) (actual time=0.170..0.170 rows=0 loops=1)

39. 0.134 0.134 ↓ 0.0 0 1

Bitmap Index Scan on audit_evs_all_20200726_when_created_idx (cost=0.00..1.83 rows=5 width=0) (actual time=0.134..0.134 rows=0 loops=1)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
40. 0.035 0.035 ↑ 1.1 62 1

Bitmap Index Scan on audit_evs_all_20200726_ev_id_person_id_delivery_status_orde_idx (cost=0.00..2.41 rows=66 width=0) (actual time=0.035..0.035 rows=62 loops=1)

  • Index Cond: (ev_id IS NULL)
41. 0.004 0.004 ↓ 0.0 0 1

Index Scan using audit_evs_all_default_ev_id_person_id_delivery_status_order_idx on audit_evs_all_default aea_16 (cost=0.12..3.14 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
42. 0.000 0.000 ↓ 0.0 0

Index Only Scan using evs_ev_id_message_panel_id_idx on evs evs_2 (cost=0.42..3.06 rows=1 width=8) (never executed)

  • Index Cond: (ev_id = aea_13.ev_id)
  • Heap Fetches: 0
43. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200726_pkey on audit_evs_all_20200726 aea_3 (cost=0.42..3.44 rows=1 width=14) (never executed)

  • Index Cond: ((audit_ev_id = aea2_2.audit_ev_id) AND (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone))
44. 0.001 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.67..143.75 rows=1 width=38) (actual time=0.003..0.004 rows=0 loops=1)

  • Join Filter: (aea_4.audit_ev_id = aea2_3.audit_ev_id)
45. 0.003 0.003 ↓ 0.0 0 1

Index Scan using audit_evs_all_default_pkey on audit_evs_all_default aea_4 (cost=0.12..3.14 rows=1 width=14) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
46. 0.000 0.000 ↓ 0.0 0

Subquery Scan on aea2_3 (cost=0.54..140.60 rows=1 width=40) (never executed)

47. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.54..140.59 rows=1 width=8) (never executed)

48. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.54..140.59 rows=1 width=8) (never executed)

  • Filter: (((aea_17.ev_id IS NOT NULL) AND (evs_3.ev_id IS NULL)) OR (aea_17.ev_id IS NULL))
49. 0.000 0.000 ↓ 0.0 0

Append (cost=0.12..116.03 rows=8 width=16) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200724_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200724 aea_17 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
51. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_20200725_ev_id_person_id_delivery_status_orde_idx on audit_evs_all_20200725 aea_18 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
52. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on audit_evs_all_20200726 aea_19 (cost=4.25..106.56 rows=5 width=16) (never executed)

  • Recheck Cond: (((when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone) AND (ev_id IS NOT NULL)) OR (ev_id IS NULL))
  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
53. 0.000 0.000 ↓ 0.0 0

BitmapOr (cost=4.25..4.25 rows=71 width=0) (never executed)

54. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on audit_evs_all_20200726_when_created_idx (cost=0.00..1.83 rows=5 width=0) (never executed)

  • Index Cond: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
55. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on audit_evs_all_20200726_ev_id_person_id_delivery_status_orde_idx (cost=0.00..2.41 rows=66 width=0) (never executed)

  • Index Cond: (ev_id IS NULL)
56. 0.000 0.000 ↓ 0.0 0

Index Scan using audit_evs_all_default_ev_id_person_id_delivery_status_order_idx on audit_evs_all_default aea_20 (cost=0.12..3.14 rows=1 width=16) (never executed)

  • Filter: (when_created <= '2020-07-25 17:15:21.635-07'::timestamp with time zone)
57. 0.000 0.000 ↓ 0.0 0

Index Only Scan using evs_ev_id_message_panel_id_idx on evs evs_3 (cost=0.42..3.06 rows=1 width=8) (never executed)

  • Index Cond: (ev_id = aea_17.ev_id)
  • Heap Fetches: 0
Planning time : 55.030 ms
Execution time : 0.817 ms