explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K3ur

Settings
# exclusive inclusive rows x rows loops node
1. 1,026.633 61,792.625 ↓ 1.7 199,341 1

Merge Join (cost=7.06..944,147.18 rows=116,575 width=55) (actual time=33.757..61,792.625 rows=199,341 loops=1)

  • Merge Cond: ((t.id = o.active_transaction_id) AND (t.ticket_id_ticket = o.ticket_id_ticket) AND (t.ticket_id_branch = o.ticket_id_branch))
2. 1,373.253 40,077.976 ↓ 1.0 7,000,748 1

Merge Append (cost=3.52..820,272.15 rows=6,978,668 width=29) (actual time=29.332..40,077.976 rows=7,000,748 loops=1)

  • Sort Key: t.id, t.ticket_id_ticket, t.ticket_id_branch
3. 4,829.918 4,829.918 ↓ 1.0 874,485 1

Index Scan using transaction_p00_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p00 t (cost=0.42..84,949.39 rows=860,934 width=29) (actual time=24.207..4,829.918 rows=874,485 loops=1)

4. 4,823.133 4,823.133 ↓ 1.0 874,436 1

Index Scan using transaction_p01_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p01 t_1 (cost=0.42..85,011.84 rows=870,346 width=29) (actual time=0.983..4,823.133 rows=874,436 loops=1)

5. 4,876.491 4,876.491 ↑ 1.0 875,103 1

Index Scan using transaction_p02_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p02 t_2 (cost=0.42..85,138.33 rows=881,178 width=29) (actual time=0.951..4,876.491 rows=875,103 loops=1)

6. 4,853.256 4,853.256 ↓ 1.0 875,515 1

Index Scan using transaction_p03_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p03 t_3 (cost=0.42..85,114.74 rows=865,273 width=29) (actual time=0.836..4,853.256 rows=875,515 loops=1)

7. 4,790.431 4,790.431 ↓ 1.0 877,359 1

Index Scan using transaction_p04_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p04 t_4 (cost=0.42..84,994.51 rows=865,998 width=29) (actual time=0.601..4,790.431 rows=877,359 loops=1)

8. 4,839.252 4,839.252 ↑ 1.0 875,803 1

Index Scan using transaction_p05_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p05 t_5 (cost=0.42..85,240.76 rows=881,754 width=29) (actual time=0.585..4,839.252 rows=875,803 loops=1)

9. 4,857.784 4,857.784 ↓ 1.0 872,973 1

Index Scan using transaction_p06_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p06 t_6 (cost=0.42..85,079.31 rows=872,800 width=29) (actual time=0.600..4,857.784 rows=872,973 loops=1)

10. 4,834.458 4,834.458 ↑ 1.0 875,075 1

Index Scan using transaction_p07_id_ticket_id_ticket_ticket_id_branch_idx on transaction_p07 t_7 (cost=0.42..85,169.79 rows=880,385 width=29) (actual time=0.561..4,834.458 rows=875,075 loops=1)

11. 555.820 20,688.016 ↑ 10.0 998,728 1

Materialize (cost=3.54..629,130.47 rows=10,000,000 width=42) (actual time=3.984..20,688.016 rows=998,728 loops=1)

12. 274.621 20,132.196 ↑ 10.0 998,728 1

Merge Append (cost=3.54..604,130.47 rows=10,000,000 width=42) (actual time=3.975..20,132.196 rows=998,728 loops=1)

  • Sort Key: o.active_transaction_id, o.ticket_id_ticket, o.ticket_id_branch
13. 2,475.269 2,475.269 ↑ 10.0 124,573 1

Index Scan using offer_p00_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p00 o (cost=0.43..50,507.62 rows=1,250,000 width=42) (actual time=0.464..2,475.269 rows=124,573 loops=1)

14. 2,470.431 2,470.431 ↑ 10.0 125,205 1

Index Scan using offer_p01_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p01 o_1 (cost=0.43..50,536.48 rows=1,250,000 width=42) (actual time=0.464..2,470.431 rows=125,205 loops=1)

15. 2,467.128 2,467.128 ↑ 10.0 124,624 1

Index Scan using offer_p02_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p02 o_2 (cost=0.43..50,521.06 rows=1,250,000 width=42) (actual time=0.500..2,467.128 rows=124,624 loops=1)

16. 2,487.357 2,487.357 ↑ 10.0 124,523 1

Index Scan using offer_p03_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p03 o_3 (cost=0.43..50,522.26 rows=1,250,000 width=42) (actual time=0.444..2,487.357 rows=124,523 loops=1)

17. 2,455.392 2,455.392 ↑ 10.0 124,977 1

Index Scan using offer_p04_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p04 o_4 (cost=0.43..50,514.69 rows=1,250,000 width=42) (actual time=0.461..2,455.392 rows=124,977 loops=1)

18. 2,520.383 2,520.383 ↑ 10.0 124,768 1

Index Scan using offer_p05_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p05 o_5 (cost=0.43..50,505.66 rows=1,250,000 width=42) (actual time=0.440..2,520.383 rows=124,768 loops=1)

19. 2,487.312 2,487.312 ↑ 10.0 124,614 1

Index Scan using offer_p06_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p06 o_6 (cost=0.43..50,494.90 rows=1,250,000 width=42) (actual time=0.828..2,487.312 rows=124,614 loops=1)

20. 2,494.303 2,494.303 ↑ 10.0 125,451 1

Index Scan using offer_p07_active_transaction_id_ticket_id_ticket_ticket_id__idx on offer_p07 o_7 (cost=0.43..50,527.67 rows=1,250,000 width=42) (actual time=0.368..2,494.303 rows=125,451 loops=1)

Planning time : 1.969 ms
Execution time : 61,811.370 ms