explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ci4H

Settings
# exclusive inclusive rows x rows loops node
1. 1.201 5,327.206 ↓ 6.6 1,906 1

Sort (cost=244,107.42..244,108.14 rows=287 width=113) (actual time=5,327.080..5,327.206 rows=1,906 loops=1)

  • Sort Key: es.id DESC
  • Sort Method: quicksort Memory: 337kB
2. 7.114 5,326.005 ↓ 6.6 1,906 1

Hash Join (cost=240,325.04..244,095.70 rows=287 width=113) (actual time=5,307.652..5,326.005 rows=1,906 loops=1)

  • Hash Cond: (es.reference_number = t.id)
3. 15.798 15.798 ↓ 6.7 1,921 1

Seq Scan on email_summaries es (cost=0.00..3,766.36 rows=287 width=38) (actual time=0.022..15.798 rows=1,921 loops=1)

  • 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:44:59.184896'::timestamp without time zone - (created_on)::timestamp without time zone)) * '24'::double precision) + date_part('hour'::text, ('02/11/2019 08:44:59.184896'::timestamp without time zone - (created_on)::timestamp without time zone))) * '60'::double precision) + (date_part('minute'::text, ('02/11/2019 08:44:59.184896'::timestamp without time zone - (created_on)::timestamp without time zone)) * '60'::double precision)) + date_part('second'::text, ('02/11/2019 08:44:59.184896'::timestamp without time zone - (created_on)::timestamp without time zone))) >= '10'::double precision))
  • Rows Removed by Filter: 49015
4. 736.219 5,303.093 ↓ 1.0 1,541,436 1

Hash (cost=221,104.45..221,104.45 rows=1,537,647 width=79) (actual time=5,303.093..5,303.093 rows=1,541,436 loops=1)

  • Buckets: 2097152 Batches: 1 Memory Usage: 165956kB
5. 610.215 4,566.874 ↓ 1.0 1,541,436 1

Hash Left Join (cost=694.12..221,104.45 rows=1,537,647 width=79) (actual time=7.338..4,566.874 rows=1,541,436 loops=1)

  • Hash Cond: (u.employee_id = e.id)
6. 558.429 3,952.646 ↓ 1.0 1,541,436 1

Hash Left Join (cost=354.94..216,726.71 rows=1,537,647 width=69) (actual time=3.237..3,952.646 rows=1,541,436 loops=1)

  • Hash Cond: (t.user_id = u.id)
7. 431.512 3,391.408 ↓ 1.0 1,541,436 1

Hash Left Join (cost=13.83..212,347.05 rows=1,537,647 width=69) (actual time=0.355..3,391.408 rows=1,541,436 loops=1)

  • Hash Cond: (t.ps_product_id = pp.id)
8. 486.046 2,959.804 ↓ 1.0 1,541,436 1

Hash Left Join (cost=8.85..208,182.49 rows=1,537,647 width=59) (actual time=0.241..2,959.804 rows=1,541,436 loops=1)

  • Hash Cond: (t.task_type_id = tt.id)
9. 431.151 2,473.667 ↓ 1.0 1,541,436 1

Hash Left Join (cost=2.94..204,007.65 rows=1,537,647 width=42) (actual time=0.129..2,473.667 rows=1,541,436 loops=1)

  • Hash Cond: (t.task_status_id = ts.id)
10. 1,372.458 2,042.487 ↓ 1.0 1,541,436 1

Hash Left Join (cost=1.11..199,507.17 rows=1,537,647 width=34) (actual time=0.076..2,042.487 rows=1,541,436 loops=1)

  • Hash Cond: (t.task_priority_id = tp.id)
11. 670.011 670.011 ↓ 1.0 1,541,436 1

Seq Scan on tasks t (cost=0.00..192,048.47 rows=1,537,647 width=36) (actual time=0.027..670.011 rows=1,541,436 loops=1)

12. 0.011 0.018 ↑ 1.0 5 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on task_priorities tp (cost=0.00..1.05 rows=5 width=10) (actual time=0.006..0.007 rows=5 loops=1)

14. 0.016 0.029 ↑ 1.0 37 1

Hash (cost=1.37..1.37 rows=37 width=16) (actual time=0.029..0.029 rows=37 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
15. 0.013 0.013 ↑ 1.0 37 1

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

16. 0.041 0.091 ↑ 1.0 129 1

Hash (cost=4.29..4.29 rows=129 width=21) (actual time=0.091..0.091 rows=129 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
17. 0.050 0.050 ↑ 1.0 129 1

Seq Scan on task_types tt (cost=0.00..4.29 rows=129 width=21) (actual time=0.015..0.050 rows=129 loops=1)

18. 0.041 0.092 ↑ 1.0 88 1

Hash (cost=3.88..3.88 rows=88 width=18) (actual time=0.092..0.092 rows=88 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
19. 0.051 0.051 ↑ 1.0 88 1

Seq Scan on ps_products pp (cost=0.00..3.88 rows=88 width=18) (actual time=0.008..0.051 rows=88 loops=1)

20. 1.295 2.809 ↑ 1.3 5,954 1

Hash (cost=244.94..244.94 rows=7,694 width=8) (actual time=2.809..2.809 rows=5,954 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 297kB
21. 1.514 1.514 ↑ 1.3 5,954 1

Seq Scan on users u (cost=0.00..244.94 rows=7,694 width=8) (actual time=0.010..1.514 rows=5,954 loops=1)

22. 1.537 4.013 ↑ 1.0 5,950 1

Hash (cost=264.08..264.08 rows=6,008 width=18) (actual time=4.013..4.013 rows=5,950 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 366kB
23. 2.476 2.476 ↑ 1.0 5,950 1

Seq Scan on employees e (cost=0.00..264.08 rows=6,008 width=18) (actual time=0.010..2.476 rows=5,950 loops=1)