explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aqtp

Settings
# exclusive inclusive rows x rows loops node
1. 99.335 5,447.542 ↓ 18.0 395 1

Subquery Scan on st (cost=3,446.80..3,641.17 rows=22 width=414) (actual time=5,315.329..5,447.542 rows=395 loops=1)

2. 25.541 5,348.207 ↓ 18.0 395 1

Result (cost=3,446.80..3,635.45 rows=22 width=419) (actual time=5,313.147..5,348.207 rows=395 loops=1)

3. 0.901 5,312.001 ↓ 18.0 395 1

Sort (cost=3,446.80..3,446.86 rows=22 width=383) (actual time=5,311.774..5,312.001 rows=395 loops=1)

  • Sort Key: (COALESCE(srv.server_name, srve.server_name)), bp.profile_name, bt.target_name
  • Sort Method: quicksort Memory: 219kB
4. 0.366 5,311.100 ↓ 18.0 395 1

WindowAgg (cost=3,445.76..3,446.31 rows=22 width=383) (actual time=5,310.690..5,311.100 rows=395 loops=1)

5. 1.749 5,310.734 ↓ 18.0 395 1

Sort (cost=3,445.76..3,445.82 rows=22 width=354) (actual time=5,310.679..5,310.734 rows=395 loops=1)

  • Sort Key: bs.server_id, bpt.bck_profile_id, bt.bck_target_id, bs.created DESC
  • Sort Method: quicksort Memory: 219kB
6. 5,288.596 5,308.985 ↓ 18.0 395 1

Hash Right Join (cost=639.89..3,445.27 rows=22 width=354) (actual time=11.001..5,308.985 rows=395 loops=1)

  • Hash Cond: (srv.server_id = srve.server_id)
  • Filter: (((srv.customer_id = 'linuxboxcz'::text) AND server_care.check_permission_server('linuxbox'::text, srv.server_id, 'server.view'::text, NULL::text) AND (NOT bpt.hidden_t
  • Rows Removed by Filter: 2,736
7. 2.311 20.192 ↓ 1.0 3,008 1

Hash Join (cost=612.92..1,844.96 rows=3,004 width=338) (actual time=3.490..20.192 rows=3,008 loops=1)

  • Hash Cond: (bs.server_id = srv.server_id)
8. 2.245 17.805 ↓ 1.0 3,008 1

Hash Join (cost=585.95..1,776.68 rows=3,004 width=288) (actual time=3.401..17.805 rows=3,008 loops=1)

  • Hash Cond: (bs.bck_definition_id = bd.bck_definition_id)
9. 3.637 15.534 ↓ 1.0 3,008 1

Hash Join (cost=583.83..1,733.25 rows=3,004 width=287) (actual time=3.366..15.534 rows=3,008 loops=1)

  • Hash Cond: (bst.bck_target_id = bpt.bck_profile_target_id)
10. 6.594 11.729 ↓ 1.0 3,008 1

Hash Join (cost=575.59..1,683.71 rows=3,004 width=182) (actual time=3.184..11.729 rows=3,008 loops=1)

  • Hash Cond: (bs.bck_snapshot_id = bst.bck_snapshot_id)
11. 1.983 1.983 ↓ 1.0 6,899 1

Seq Scan on bck_snapshot bs (cost=0.00..1,034.97 rows=6,897 width=91) (actual time=0.002..1.983 rows=6,899 loops=1)

12. 1.092 3.152 ↓ 1.0 3,008 1

Hash (cost=538.04..538.04 rows=3,004 width=118) (actual time=3.152..3.152 rows=3,008 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 497kB
13. 2.060 2.060 ↓ 1.0 3,008 1

Seq Scan on bck_snapshot_target bst (cost=0.00..538.04 rows=3,004 width=118) (actual time=0.007..2.060 rows=3,008 loops=1)

14. 0.034 0.168 ↑ 1.0 56 1

Hash (cost=7.54..7.54 rows=56 width=136) (actual time=0.168..0.168 rows=56 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 18kB
15. 0.029 0.134 ↑ 1.0 56 1

Hash Join (cost=3.44..7.54 rows=56 width=136) (actual time=0.070..0.134 rows=56 loops=1)

  • Hash Cond: (bpt.bck_target_id = bt.bck_target_id)
16. 0.037 0.079 ↑ 1.0 56 1

Hash Join (cost=1.54..4.87 rows=56 width=93) (actual time=0.034..0.079 rows=56 loops=1)

  • Hash Cond: (bpt.bck_profile_id = bp.bck_profile_id)
17. 0.026 0.026 ↑ 1.0 56 1

Seq Scan on bck_profile_target bpt (cost=0.00..2.56 rows=56 width=77) (actual time=0.003..0.026 rows=56 loops=1)

18. 0.007 0.016 ↑ 1.0 24 1

Hash (cost=1.24..1.24 rows=24 width=40) (actual time=0.016..0.016 rows=24 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
19. 0.009 0.009 ↑ 1.0 24 1

Seq Scan on bck_profile bp (cost=0.00..1.24 rows=24 width=40) (actual time=0.003..0.009 rows=24 loops=1)

20. 0.016 0.026 ↑ 1.0 40 1

Hash (cost=1.40..1.40 rows=40 width=43) (actual time=0.026..0.026 rows=40 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
21. 0.010 0.010 ↑ 1.0 40 1

Seq Scan on bck_target bt (cost=0.00..1.40 rows=40 width=43) (actual time=0.003..0.010 rows=40 loops=1)

22. 0.014 0.026 ↑ 1.0 50 1

Hash (cost=1.50..1.50 rows=50 width=28) (actual time=0.026..0.026 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
23. 0.012 0.012 ↑ 1.0 50 1

Seq Scan on bck_definition bd (cost=0.00..1.50 rows=50 width=28) (actual time=0.003..0.012 rows=50 loops=1)

24. 0.041 0.076 ↑ 1.0 132 1

Hash (cost=25.32..25.32 rows=132 width=50) (actual time=0.076..0.076 rows=132 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
25. 0.035 0.035 ↑ 1.0 132 1

Seq Scan on servers srv (cost=0.00..25.32 rows=132 width=50) (actual time=0.002..0.035 rows=132 loops=1)

26. 0.057 0.197 ↑ 1.0 132 1

Hash (cost=25.32..25.32 rows=132 width=62) (actual time=0.197..0.197 rows=132 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 21kB
27. 0.140 0.140 ↑ 1.0 132 1

Seq Scan on servers srve (cost=0.00..25.32 rows=132 width=62) (actual time=0.010..0.140 rows=132 loops=1)

28.          

SubPlan (for Result)

29. 0.395 10.665 ↓ 0.0 0 395

Limit (cost=8.31..8.31 rows=1 width=40) (actual time=0.027..0.027 rows=0 loops=395)

30. 10.270 10.270 ↓ 0.0 0 395

Sort (cost=8.31..8.31 rows=1 width=40) (actual time=0.026..0.026 rows=0 loops=395)

  • Sort Key: bsta.attempt_start DESC
  • Sort Method: quicksort Memory: 25kB
  • -> Index Scan using bck_snapshot_target_attempt_bck_snapshot_target_id_idx on bck_snapshot_target_attempt bsta (cost=0.28..8.30 rows=1 width=40) (actual time=0.021..0.022 rows=1 loops=
  • Index Cond: (bck_snapshot_target_id = bst.bck_snapshot_target_id)