explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LI7M

Settings
# exclusive inclusive rows x rows loops node
1. 2,600.350 7,668.267 ↓ 399.0 141,262 1

Hash Left Join (cost=6.97..120.08 rows=354 width=1,293) (actual time=0.834..7,668.267 rows=141,262 loops=1)

  • Hash Cond: (af.functions_id = f.id)
2. 2,808.674 5,067.545 ↓ 399.0 141,262 1

Nested Loop Left Join (cost=5.75..113.99 rows=354 width=1,229) (actual time=0.430..5,067.545 rows=141,262 loops=1)

3. 328.739 735.351 ↓ 330.6 15,870 1

Nested Loop (cost=5.46..74.50 rows=48 width=1,209) (actual time=0.384..735.351 rows=15,870 loops=1)

4. 57.415 220.069 ↓ 329.0 2,303 1

Nested Loop Left Join (cost=5.17..66.15 rows=7 width=643) (actual time=0.347..220.069 rows=2,303 loops=1)

5. 25.776 128.993 ↓ 273.7 821 1

Nested Loop Left Join (cost=4.88..64.36 rows=3 width=607) (actual time=0.301..128.993 rows=821 loops=1)

6. 20.364 86.657 ↓ 184.0 552 1

Nested Loop (cost=4.60..63.16 rows=3 width=571) (actual time=0.257..86.657 rows=552 loops=1)

7. 26.820 53.597 ↓ 184.0 552 1

Nested Loop (cost=4.47..62.67 rows=3 width=289) (actual time=0.215..53.597 rows=552 loops=1)

8. 8.138 8.275 ↓ 168.2 841 1

Bitmap Heap Scan on locations l (cost=4.19..21.12 rows=5 width=177) (actual time=0.165..8.275 rows=841 loops=1)

  • Recheck Cond: (point <@ '(37.9329689999999999,55.9328860000000034),(37.2985090000000028,55.5587689999999981)'::box)
  • Heap Blocks: exact=115
9. 0.137 0.137 ↓ 168.2 841 1

Bitmap Index Scan on locations_point_idx (cost=0.00..4.18 rows=5 width=0) (actual time=0.129..0.137 rows=841 loops=1)

  • Index Cond: (point <@ '(37.9329689999999999,55.9328860000000034),(37.2985090000000028,55.5587689999999981)'::box)
10. 18.502 18.502 ↑ 1.0 1 841

Index Scan using atms_pkey on atms a (cost=0.28..8.30 rows=1 width=112) (actual time=0.016..0.022 rows=1 loops=841)

  • Index Cond: (uuid = l.atms_uuid)
  • Filter: (NOT private)
  • Rows Removed by Filter: 0
11. 12.696 12.696 ↑ 1.0 1 552

Index Scan using banks_pkey on banks b (cost=0.13..0.15 rows=1 width=282) (actual time=0.013..0.023 rows=1 loops=552)

  • Index Cond: (id = a.banks_id)
12. 16.560 16.560 ↑ 1.0 1 552

Index Scan using cash_out_atms_uuid_idx on cash_out co (cost=0.28..0.39 rows=1 width=36) (actual time=0.015..0.030 rows=1 loops=552)

  • Index Cond: (a.uuid = atms_uuid)
13. 33.661 33.661 ↑ 1.0 3 821

Index Scan using cash_in_atms_uuid_idx on cash_in ci (cost=0.29..0.57 rows=3 width=36) (actual time=0.015..0.041 rows=3 loops=821)

  • Index Cond: (a.uuid = atms_uuid)
14. 186.543 186.543 ↑ 1.0 7 2,303

Index Scan using working_times_atms_uuid_idx on working_times wt (cost=0.29..1.12 rows=7 width=566) (actual time=0.014..0.081 rows=7 loops=2,303)

  • Index Cond: (atms_uuid = a.uuid)
15. 1,523.520 1,523.520 ↓ 1.3 9 15,870

Index Only Scan using atms_functions_pkey on atms_functions af (cost=0.29..0.75 rows=7 width=20) (actual time=0.013..0.096 rows=9 loops=15,870)

  • Index Cond: (atms_uuid = a.uuid)
  • Heap Fetches: 0
16. 0.143 0.372 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=64) (actual time=0.364..0.372 rows=10 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.229 0.229 ↑ 1.0 10 1

Seq Scan on functions f (cost=0.00..1.10 rows=10 width=64) (actual time=0.015..0.229 rows=10 loops=1)

Planning time : 3.336 ms
Execution time : 8,923.363 ms