explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 55cC

Settings
# exclusive inclusive rows x rows loops node
1. 555.103 1,770.905 ↓ 6,668.0 6,668 1

Nested Loop (cost=3.26..1,958.00 rows=1 width=80) (actual time=2.325..1,770.905 rows=6,668 loops=1)

  • Join Filter: (kit_features_kits_join.feature_id = features_kits_2.id)
  • Rows Removed by Join Filter: 57,658
2. 112.206 762.378 ↓ 6,668.0 6,668 1

Nested Loop (cost=3.26..1,956.53 rows=1 width=96) (actual time=2.242..762.378 rows=6,668 loops=1)

3. 77.009 574.516 ↓ 1,351.0 1,351 1

Nested Loop (cost=2.84..1,955.97 rows=1 width=128) (actual time=2.205..574.516 rows=1,351 loops=1)

  • Join Filter: (features.id = features_kits.id)
  • Rows Removed by Join Filter: 6,494
4. 18.254 439.414 ↓ 1,351.0 1,351 1

Nested Loop (cost=2.84..1,954.50 rows=1 width=176) (actual time=2.119..439.414 rows=1,351 loops=1)

5. 0.068 0.068 ↓ 1.3 4 1

Index Scan using index_pets_on_owner_id on pets (cost=0.42..16.48 rows=3 width=16) (actual time=0.022..0.068 rows=4 loops=1)

  • Index Cond: (owner_id = '11c67538-0bd4-43bc-87dd-1bd9514f57e9'::uuid)
6. 19.656 421.092 ↑ 102.1 338 4

Nested Loop (cost=2.41..301.02 rows=34,499 width=192) (actual time=0.954..105.273 rows=338 loops=4)

7. 0.432 0.432 ↓ 9.0 9 4

Seq Scan on features (cost=0.00..1.47 rows=1 width=16) (actual time=0.015..0.108 rows=9 loops=4)

  • Filter: ('health-test'::text = ANY ((allowed_results)::text[]))
  • Rows Removed by Filter: 13
8. 19.908 401.004 ↓ 38.0 38 36

Nested Loop (cost=2.41..299.53 rows=1 width=176) (actual time=0.241..11.139 rows=38 loops=36)

9. 0.720 0.720 ↑ 1.0 1 36

Index Scan using index_kits_on_pet_id on kits (cost=0.43..8.45 rows=1 width=32) (actual time=0.013..0.020 rows=1 loops=36)

  • Index Cond: (pet_id = pets.id)
10. 20.781 380.376 ↓ 38.0 38 36

Nested Loop (cost=1.99..291.08 rows=1 width=144) (actual time=0.194..10.566 rows=38 loops=36)

11. 1.008 1.008 ↓ 2.0 2 36

Index Scan using index_result_sets_on_kit_id on result_sets (cost=0.29..0.31 rows=1 width=32) (actual time=0.011..0.028 rows=2 loops=36)

  • Index Cond: (kit_id = kits.id)
12. 21.030 358.587 ↑ 19.1 17 81

Nested Loop (cost=1.70..287.52 rows=325 width=144) (actual time=0.127..4.427 rows=17 loops=81)

  • Join Filter: (features.id = features_health_tests.feature_id)
13. 1.377 1.377 ↓ 0.0 0 81

Index Only Scan using index_kit_features_on_kit_id_and_feature_id on kit_features (cost=0.42..8.45 rows=1 width=32) (actual time=0.016..0.017 rows=0 loops=81)

  • Index Cond: ((kit_id = result_sets.kit_id) AND (feature_id = features.id))
  • Heap Fetches: 15
14. 18.930 336.180 ↑ 3.6 90 15

Nested Loop (cost=1.27..275.01 rows=325 width=112) (actual time=0.504..22.412 rows=90 loops=15)

15. 0.420 0.420 ↑ 1.0 1 15

Index Scan using index_health_results_on_result_set_id on health_results (cost=0.29..0.36 rows=1 width=32) (actual time=0.019..0.028 rows=1 loops=15)

  • Index Cond: (result_set_id = result_sets.id)
16. 66.700 316.830 ↑ 3.6 90 15

Nested Loop (cost=0.98..271.40 rows=325 width=96) (actual time=0.463..21.122 rows=90 loops=15)

17. 25.770 25.770 ↑ 1.5 211 15

Index Scan using index_health_test_results_on_health_result_id on health_test_results (cost=0.56..20.80 rows=325 width=80) (actual time=0.022..1.718 rows=211 loops=15)

  • Index Cond: (health_result_id = health_results.id)
18. 110.600 224.360 ↓ 0.0 0 3,160

Nested Loop (cost=0.42..0.76 rows=1 width=48) (actual time=0.056..0.071 rows=0 loops=3,160)

19. 63.200 63.200 ↑ 1.0 1 3,160

Index Only Scan using health_tests_pkey on health_tests (cost=0.14..0.16 rows=1 width=16) (actual time=0.012..0.020 rows=1 loops=3,160)

  • Index Cond: (id = health_test_results.health_test_id)
  • Heap Fetches: 3,160
20. 50.560 50.560 ↓ 0.0 0 3,160

Index Only Scan using index_features_health_tests_on_feature_id_and_health_test_id on features_health_tests (cost=0.28..0.59 rows=1 width=32) (actual time=0.012..0.016 rows=0 loops=3,160)

  • Index Cond: ((feature_id = kit_features.feature_id) AND (health_test_id = health_tests.id))
  • Heap Fetches: 1,351
21. 58.093 58.093 ↑ 3.5 6 1,351

Seq Scan on features features_kits (cost=0.00..1.21 rows=21 width=16) (actual time=0.009..0.043 rows=6 loops=1,351)

22. 75.656 75.656 ↓ 1.2 5 1,351

Index Only Scan using index_kit_features_on_kit_id_and_feature_id on kit_features kit_features_kits_join (cost=0.42..0.52 rows=4 width=32) (actual time=0.015..0.056 rows=5 loops=1,351)

  • Index Cond: (kit_id = kits.id)
  • Heap Fetches: 6,668
23. 453.424 453.424 ↑ 2.1 10 6,668

Seq Scan on features features_kits_2 (cost=0.00..1.21 rows=21 width=16) (actual time=0.009..0.068 rows=10 loops=6,668)

Planning time : 37.698 ms
Execution time : 1,815.215 ms