explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N6EX

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,425.872 ↓ 7.4 1,943 1

Gather Merge (cost=262,250.24..262,280.81 rows=262 width=113) (actual time=1,405.492..1,425.872 rows=1,943 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1.623 4,197.387 ↓ 4.9 648 3

Sort (cost=261,250.22..261,250.54 rows=131 width=113) (actual time=1,399.067..1,399.129 rows=648 loops=3)

  • Sort Key: es.id DESC
  • Sort Method: quicksort Memory: 114kB
3. 209.160 4,195.764 ↓ 4.9 648 3

Hash Join (cost=4,949.49..261,245.61 rows=131 width=113) (actual time=663.337..1,398.588 rows=648 loops=3)

  • Hash Cond: (t.id = es.reference_number)
4. 401.877 3,938.787 ↑ 1.3 522,095 3

Hash Left Join (cost=1,245.78..210,142.26 rows=653,770 width=79) (actual time=8.773..1,312.929 rows=522,095 loops=3)

  • Hash Cond: (u.employee_id = e.id)
5. 415.899 3,524.889 ↑ 1.3 522,095 3

Hash Left Join (cost=801.86..207,980.97 rows=653,770 width=69) (actual time=4.723..1,174.963 rows=522,095 loops=3)

  • Hash Cond: (t.user_id = u.id)
6. 305.421 3,100.224 ↑ 1.3 522,095 3

Hash Left Join (cost=459.83..205,921.57 rows=653,770 width=69) (actual time=1.761..1,033.408 rows=522,095 loops=3)

  • Hash Cond: (t.ps_product_id = pp.id)
7. 348.840 2,790.228 ↑ 1.3 522,095 3

Hash Left Join (cost=8.85..203,702.58 rows=653,770 width=59) (actual time=0.227..930.076 rows=522,095 loops=3)

  • Hash Cond: (t.task_type_id = tt.id)
8. 332.223 2,441.196 ↑ 1.3 522,095 3

Hash Left Join (cost=2.94..201,924.15 rows=653,770 width=42) (actual time=0.150..813.732 rows=522,095 loops=3)

  • Hash Cond: (t.task_status_id = ts.id)
9. 1,489.743 2,108.907 ↑ 1.3 522,095 3

Hash Left Join (cost=1.11..200,009.60 rows=653,770 width=34) (actual time=0.119..702.969 rows=522,095 loops=3)

  • Hash Cond: (t.task_priority_id = tp.id)
10. 619.110 619.110 ↑ 1.3 522,095 3

Parallel Seq Scan on tasks t (cost=0.00..196,837.70 rows=653,770 width=36) (actual time=0.011..206.370 rows=522,095 loops=3)

11. 0.012 0.054 ↑ 1.0 5 3

Hash (cost=1.05..1.05 rows=5 width=10) (actual time=0.018..0.018 rows=5 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.042 0.042 ↑ 1.0 5 3

Seq Scan on task_priorities tp (cost=0.00..1.05 rows=5 width=10) (actual time=0.013..0.014 rows=5 loops=3)

13. 0.030 0.066 ↑ 1.0 37 3

Hash (cost=1.37..1.37 rows=37 width=16) (actual time=0.022..0.022 rows=37 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
14. 0.036 0.036 ↑ 1.0 37 3

Seq Scan on task_statuses ts (cost=0.00..1.37 rows=37 width=16) (actual time=0.007..0.012 rows=37 loops=3)

15. 0.066 0.192 ↑ 1.0 129 3

Hash (cost=4.29..4.29 rows=129 width=21) (actual time=0.064..0.064 rows=129 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
16. 0.126 0.126 ↑ 1.0 129 3

Seq Scan on task_types tt (cost=0.00..4.29 rows=129 width=21) (actual time=0.011..0.042 rows=129 loops=3)

17. 0.066 4.575 ↑ 1.0 88 3

Hash (cost=449.88..449.88 rows=88 width=18) (actual time=1.525..1.525 rows=88 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
18. 4.509 4.509 ↑ 1.0 88 3

Seq Scan on ps_products pp (cost=0.00..449.88 rows=88 width=18) (actual time=0.008..1.503 rows=88 loops=3)

19. 2.964 8.766 ↑ 1.0 5,957 3

Hash (cost=267.57..267.57 rows=5,957 width=8) (actual time=2.922..2.922 rows=5,957 loops=3)

  • Buckets: 8192 Batches: 1 Memory Usage: 297kB
20. 5.802 5.802 ↑ 1.0 5,957 3

Seq Scan on users u (cost=0.00..267.57 rows=5,957 width=8) (actual time=0.011..1.934 rows=5,957 loops=3)

21. 3.264 12.021 ↑ 1.0 5,952 3

Hash (cost=369.52..369.52 rows=5,952 width=18) (actual time=4.007..4.007 rows=5,952 loops=3)

  • Buckets: 8192 Batches: 1 Memory Usage: 366kB
22. 8.757 8.757 ↑ 1.0 5,952 3

Seq Scan on employees e (cost=0.00..369.52 rows=5,952 width=18) (actual time=0.014..2.919 rows=5,952 loops=3)

23. 1.407 47.817 ↓ 6.2 1,958 3

Hash (cost=3,699.79..3,699.79 rows=314 width=38) (actual time=15.939..15.939 rows=1,958 loops=3)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 141kB
24. 46.410 46.410 ↓ 6.2 1,958 3

Seq Scan on email_summaries es (cost=0.00..3,699.79 rows=314 width=38) (actual time=0.039..15.470 rows=1,958 loops=3)

  • Filter: ((((sent_on IS NULL) AND (is_queued IS TRUE)) OR (is_queued IS FALSE)) AND (processed_on IS NULL) AND ((((((date_part('day'::text, ('02/11/2019 08:33:12.754009'::timestamp without time zone - (created_on)::timestamp without time zone)) * '24'::double precision) + date_part('hour'::text, ('02/11/2019 08:33:12.754009'::timestamp without time zone - (created_on)::timestamp without time zone))) * '60'::double precision) + (date_part('minute'::text, ('02/11/2019 08:33:12.754009'::timestamp without time zone - (created_on)::timestamp without time zone)) * '60'::double precision)) + date_part('second'::text, ('02/11/2019 08:33:12.754009'::timestamp without time zone - (created_on)::timestamp without time zone))) >= '10'::double precision))
  • Rows Removed by Filter: 44588