explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tTpX

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1,439.095 ↓ 7.4 1,942 1

Gather Merge (cost=262,250.24..262,280.81 rows=262 width=113) (actual time=1,419.146..1,439.095 rows=1,942 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Planning time: 2.416 ms
  • Execution time: 1439.317 ms
2. 1.593 4,239.351 ↓ 4.9 647 3

Sort (cost=261,250.22..261,250.54 rows=131 width=113) (actual time=1,413.051..1,413.117 rows=647 loops=3)

  • Sort Key: es.id DESC
  • Sort Method: quicksort Memory: 124kB
3. 264.993 4,237.758 ↓ 4.9 647 3

Hash Join (cost=4,949.49..261,245.61 rows=131 width=113) (actual time=884.024..1,412.586 rows=647 loops=3)

  • Hash Cond: (t.id = es.reference_number)
4. 420.768 3,972.765 ↑ 1.3 522,075 3

Hash Left Join (cost=1,245.78..210,142.26 rows=653,770 width=79) (actual time=8.033..1,324.255 rows=522,075 loops=3)

  • Hash Cond: (u.employee_id = e.id)
5. 424.152 3,551.997 ↑ 1.3 522,075 3

Hash Left Join (cost=801.86..207,980.97 rows=653,770 width=69) (actual time=4.211..1,183.999 rows=522,075 loops=3)

  • Hash Cond: (t.user_id = u.id)
6. 319.944 3,119.820 ↑ 1.3 522,075 3

Hash Left Join (cost=459.83..205,921.57 rows=653,770 width=69) (actual time=1.493..1,039.940 rows=522,075 loops=3)

  • Hash Cond: (t.ps_product_id = pp.id)
7. 354.891 2,796.276 ↑ 1.3 522,075 3

Hash Left Join (cost=8.85..203,702.58 rows=653,770 width=59) (actual time=0.282..932.092 rows=522,075 loops=3)

  • Hash Cond: (t.task_type_id = tt.id)
8. 351.663 2,441.184 ↑ 1.3 522,075 3

Hash Left Join (cost=2.94..201,924.15 rows=653,770 width=42) (actual time=0.190..813.728 rows=522,075 loops=3)

  • Hash Cond: (t.task_status_id = ts.id)
9. 1,506.963 2,089.452 ↑ 1.3 522,075 3

Hash Left Join (cost=1.11..200,009.60 rows=653,770 width=34) (actual time=0.158..696.484 rows=522,075 loops=3)

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

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

11. 0.015 0.129 ↑ 1.0 5 3

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

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

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

13. 0.027 0.069 ↑ 1.0 37 3

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

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

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

15. 0.069 0.201 ↑ 1.0 129 3

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

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

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

17. 0.057 3.600 ↑ 1.0 88 3

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

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

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

19. 8.025 8.025 ↑ 1.0 5,957 3

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

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

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

21. 3.024 11.355 ↑ 1.0 5,952 3

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

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

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

23. 1.332 44.643 ↓ 6.2 1,957 3

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

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

Seq Scan on email_summaries es (cost=0.00..3,699.79 rows=314 width=38) (actual time=0.033..14.437 rows=1,957 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 07:37:50.705285'::timestamp without time zone - (created_on)::timestamp without time zone)) * '24'::double precision) + date_part('hour'::text, ('02/11/2019 07:37:50.705285'::timestamp without time zone - (created_on)::timestamp without time zone))) * '60'::double precision) + (date_part('minute'::text, ('02/11/2019 07:37:50.705285'::timestamp without time zone - (created_on)::timestamp without time zone)) * '60'::double precision)) + date_part('second'::text, ('02/11/2019 07:37:50.705285'::timestamp without time zone - (created_on)::timestamp without time zone))) >= '10'::double precision))
  • Rows Removed by Filter: 44492