explain.depesz.com

PostgreSQL's explain analyze made readable

Result: y2eh : LoanByOffer 2

Settings
# exclusive inclusive rows x rows loops node
1. 0.831 39,583.890 ↑ 1.7 46 1

GroupAggregate (cost=23,145.30..23,150.76 rows=78 width=630) (actual time=39,583.762..39,583.890 rows=46 loops=1)

  • Group Key: d.name, d.id, c.id
2. 2.851 39,583.059 ↑ 1.7 46 1

Sort (cost=23,145.30..23,145.49 rows=78 width=486) (actual time=39,583.053..39,583.059 rows=46 loops=1)

  • Sort Key: d.name, d.id, c.id
  • Sort Method: quicksort Memory: 34kB
3. 0.059 39,580.208 ↑ 1.7 46 1

Nested Loop Left Join (cost=23,115.82..23,142.85 rows=78 width=486) (actual time=39,580.038..39,580.208 rows=46 loops=1)

4. 0.069 39,578.401 ↑ 1.7 46 1

Hash Full Join (cost=23,115.66..23,117.59 rows=78 width=466) (actual time=39,578.331..39,578.401 rows=46 loops=1)

  • Hash Cond: (d.id = pay.id)
5. 708.144 20,279.795 ↑ 1.7 46 1

HashAggregate (cost=21,906.67..21,907.45 rows=78 width=314) (actual time=20,279.764..20,279.795 rows=46 loops=1)

  • Group Key: d.id
6. 1,068.140 19,571.651 ↓ 69.0 1,563,640 1

Hash Left Join (cost=15.19..21,566.51 rows=22,677 width=292) (actual time=3.271..19,571.651 rows=1,563,640 loops=1)

  • Hash Cond: (t.offer_id = d.id)
7. 18,502.361 18,502.361 ↓ 69.0 1,563,640 1

Index Scan using tracks_date_index on tracks t (cost=0.43..21,490.97 rows=22,677 width=18) (actual time=2.066..18,502.361 rows=1,563,640 loops=1)

  • Index Cond: ((date >= '2019-12-31 21:00:00+03'::timestamp with time zone) AND (date <= '2020-02-01 20:59:59+03'::timestamp with time zone))
8. 0.042 1.150 ↓ 1.1 89 1

Hash (cost=13.78..13.78 rows=78 width=290) (actual time=1.148..1.150 rows=89 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 15kB
9. 1.108 1.108 ↓ 1.1 89 1

Seq Scan on destinations d (cost=0.00..13.78 rows=78 width=290) (actual time=0.044..1.108 rows=89 loops=1)

10. 0.149 19,298.537 ↓ 5.9 41 1

Hash (cost=1,208.91..1,208.91 rows=7 width=160) (actual time=19,298.537..19,298.537 rows=41 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
11. 0.087 19,298.388 ↓ 5.9 41 1

Subquery Scan on pay (cost=1,208.42..1,208.91 rows=7 width=160) (actual time=19,182.840..19,298.388 rows=41 loops=1)

12. 64.607 19,298.301 ↓ 5.9 41 1

GroupAggregate (cost=1,208.42..1,208.84 rows=7 width=434) (actual time=19,182.838..19,298.301 rows=41 loops=1)

  • Group Key: d_1.id
13. 358.686 19,233.694 ↓ 14,321.6 100,251 1

Sort (cost=1,208.42..1,208.44 rows=7 width=534) (actual time=19,180.594..19,233.694 rows=100,251 loops=1)

  • Sort Key: d_1.id
  • Sort Method: external merge Disk: 13,432kB
14. 153.336 18,875.008 ↓ 14,321.6 100,251 1

Nested Loop Left Join (cost=1.27..1,208.32 rows=7 width=534) (actual time=5.502..18,875.008 rows=100,251 loops=1)

15. 152.557 18,320.668 ↓ 14,321.6 100,251 1

Nested Loop Left Join (cost=1.12..1,203.96 rows=7 width=260) (actual time=4.708..18,320.668 rows=100,251 loops=1)

16. 121.867 1,325.943 ↓ 14,321.6 100,251 1

Nested Loop Left Join (cost=0.69..1,186.81 rows=7 width=260) (actual time=3.144..1,325.943 rows=100,251 loops=1)

17. 903.323 903.323 ↓ 14,321.6 100,251 1

Index Scan using postbacks_date_index on postbacks p (cost=0.42..1,174.78 rows=7 width=266) (actual time=2.034..903.323 rows=100,251 loops=1)

  • Index Cond: ((date >= '2019-12-31 21:00:00+03'::timestamp with time zone) AND (date <= '2020-02-01 20:59:59+03'::timestamp with time zone))
  • Filter: (updated_by IS NULL)
  • Rows Removed by Filter: 8,494
18. 300.753 300.753 ↑ 1.0 1 100,251

Index Scan using actions_id_uindex on actions a (cost=0.27..1.72 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=100,251)

  • Index Cond: (id = p.action_id)
19. 16,842.168 16,842.168 ↑ 1.0 1 100,251

Index Scan using tracks_id_uindex on tracks t_1 (cost=0.43..2.45 rows=1 width=24) (actual time=0.168..0.168 rows=1 loops=100,251)

  • Index Cond: (id = p.track_id)
20. 401.004 401.004 ↑ 1.0 1 100,251

Index Scan using destination_id_uindex on destinations d_1 (cost=0.14..0.62 rows=1 width=282) (actual time=0.004..0.004 rows=1 loops=100,251)

  • Index Cond: (id = t_1.offer_id)
21. 1.748 1.748 ↑ 1.0 1 46

Index Scan using currencies_id_uindex on currencies c (cost=0.15..0.32 rows=1 width=28) (actual time=0.038..0.038 rows=1 loops=46)

  • Index Cond: (id = d.currency_id)