explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1F2ga

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,991.01..2,669.66 rows=79 width=1,161) (actual rows= loops=)

  • Join Filter: (a.injection_object_id = a_6.id)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,787.43..2,383.93 rows=79 width=1,156) (actual rows= loops=)

  • Hash Cond: (a.shop_id = a_2.id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,774.01..2,370.20 rows=79 width=640) (actual rows= loops=)

  • Hash Cond: (a.field_id = a_1.id)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,762.02..2,357.86 rows=79 width=124) (actual rows= loops=)

  • Join Filter: (a.gathering_object_id = a_3.id)
5. 0.000 0.000 ↓ 0.0

Subquery Scan on a (cost=1,558.44..2,072.33 rows=79 width=115) (actual rows= loops=)

  • Filter: (a.rn = 1)
6. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1,558.44..1,874.68 rows=15,812 width=123) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=1,558.44..1,597.97 rows=15,812 width=115) (actual rows= loops=)

  • Sort Key: wh.id, wh.deleted_at DESC
8. 0.000 0.000 ↓ 0.0

Seq Scan on well_h wh (cost=0.00..455.65 rows=15,812 width=115) (actual rows= loops=)

  • Filter: (created_at <= '2020-09-02 00:00:00'::timestamp without time zone)
9. 0.000 0.000 ↓ 0.0

Materialize (cost=203.58..273.71 rows=10 width=25) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=203.58..273.66 rows=10 width=25) (actual rows= loops=)

  • Join Filter: (a_5.id = a_3.shop_id)
11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=191.25..260.11 rows=10 width=41) (actual rows= loops=)

  • Join Filter: (a_4.id = a_3.field_id)
12. 0.000 0.000 ↓ 0.0

Subquery Scan on a_3 (cost=179.92..247.97 rows=10 width=57) (actual rows= loops=)

  • Filter: (a_3.rn = 1)
13. 0.000 0.000 ↓ 0.0

WindowAgg (cost=179.92..221.80 rows=2,094 width=89) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Sort (cost=179.92..185.15 rows=2,094 width=65) (actual rows= loops=)

  • Sort Key: soh.id, soh.deleted_at DESC
15. 0.000 0.000 ↓ 0.0

Seq Scan on square_object_h soh (cost=0.00..64.41 rows=2,094 width=65) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
16. 0.000 0.000 ↓ 0.0

Materialize (cost=11.33..11.99 rows=1 width=16) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Subquery Scan on a_4 (cost=11.33..11.98 rows=1 width=16) (actual rows= loops=)

  • Filter: (a_4.rn = 1)
18. 0.000 0.000 ↓ 0.0

WindowAgg (cost=11.33..11.73 rows=20 width=1,290) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Sort (cost=11.33..11.38 rows=20 width=24) (actual rows= loops=)

  • Sort Key: fh.id, fh.deleted_at DESC
20. 0.000 0.000 ↓ 0.0

Seq Scan on field_h fh (cost=0.00..10.90 rows=20 width=24) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
21. 0.000 0.000 ↓ 0.0

Materialize (cost=12.33..13.41 rows=1 width=16) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Subquery Scan on a_5 (cost=12.33..13.40 rows=1 width=16) (actual rows= loops=)

  • Filter: (a_5.rn = 1)
23. 0.000 0.000 ↓ 0.0

WindowAgg (cost=12.33..12.99 rows=33 width=774) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Sort (cost=12.33..12.41 rows=33 width=24) (actual rows= loops=)

  • Sort Key: sh.id, sh.deleted_at DESC
25. 0.000 0.000 ↓ 0.0

Seq Scan on shop_h sh (cost=0.00..11.50 rows=33 width=24) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
26. 0.000 0.000 ↓ 0.0

Hash (cost=11.98..11.98 rows=1 width=532) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Subquery Scan on a_1 (cost=11.33..11.98 rows=1 width=532) (actual rows= loops=)

  • Filter: (a_1.rn = 1)
28. 0.000 0.000 ↓ 0.0

WindowAgg (cost=11.33..11.73 rows=20 width=1,290) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Sort (cost=11.33..11.38 rows=20 width=540) (actual rows= loops=)

  • Sort Key: fh_1.id, fh_1.deleted_at DESC
30. 0.000 0.000 ↓ 0.0

Seq Scan on field_h fh_1 (cost=0.00..10.90 rows=20 width=540) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
31. 0.000 0.000 ↓ 0.0

Hash (cost=13.40..13.40 rows=1 width=532) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Subquery Scan on a_2 (cost=12.33..13.40 rows=1 width=532) (actual rows= loops=)

  • Filter: (a_2.rn = 1)
33. 0.000 0.000 ↓ 0.0

WindowAgg (cost=12.33..12.99 rows=33 width=774) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Sort (cost=12.33..12.41 rows=33 width=540) (actual rows= loops=)

  • Sort Key: sh_1.id, sh_1.deleted_at DESC
35. 0.000 0.000 ↓ 0.0

Seq Scan on shop_h sh_1 (cost=0.00..11.50 rows=33 width=540) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
36. 0.000 0.000 ↓ 0.0

Materialize (cost=203.58..273.71 rows=10 width=25) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=203.58..273.66 rows=10 width=25) (actual rows= loops=)

  • Join Filter: (a_8.id = a_6.shop_id)
38. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=191.25..260.11 rows=10 width=41) (actual rows= loops=)

  • Join Filter: (a_7.id = a_6.field_id)
39. 0.000 0.000 ↓ 0.0

Subquery Scan on a_6 (cost=179.92..247.97 rows=10 width=57) (actual rows= loops=)

  • Filter: (a_6.rn = 1)
40. 0.000 0.000 ↓ 0.0

WindowAgg (cost=179.92..221.80 rows=2,094 width=89) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Sort (cost=179.92..185.15 rows=2,094 width=65) (actual rows= loops=)

  • Sort Key: soh_1.id, soh_1.deleted_at DESC
42. 0.000 0.000 ↓ 0.0

Seq Scan on square_object_h soh_1 (cost=0.00..64.41 rows=2,094 width=65) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
43. 0.000 0.000 ↓ 0.0

Materialize (cost=11.33..11.99 rows=1 width=16) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Subquery Scan on a_7 (cost=11.33..11.98 rows=1 width=16) (actual rows= loops=)

  • Filter: (a_7.rn = 1)
45. 0.000 0.000 ↓ 0.0

WindowAgg (cost=11.33..11.73 rows=20 width=1,290) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Sort (cost=11.33..11.38 rows=20 width=24) (actual rows= loops=)

  • Sort Key: fh_2.id, fh_2.deleted_at DESC
47. 0.000 0.000 ↓ 0.0

Seq Scan on field_h fh_2 (cost=0.00..10.90 rows=20 width=24) (actual rows= loops=)

  • Filter: (created_at <= CURRENT_TIMESTAMP)
48. 0.000 0.000 ↓ 0.0

Materialize (cost=12.33..13.41 rows=1 width=16) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Subquery Scan on a_8 (cost=12.33..13.40 rows=1 width=16) (actual rows= loops=)

  • Filter: (a_8.rn = 1)
50. 0.000 0.000 ↓ 0.0

WindowAgg (cost=12.33..12.99 rows=33 width=774) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Sort (cost=12.33..12.41 rows=33 width=24) (actual rows= loops=)

  • Sort Key: sh_2.id, sh_2.deleted_at DESC
52. 0.000 0.000 ↓ 0.0

Seq Scan on shop_h sh_2 (cost=0.00..11.50 rows=33 width=24) (actual rows= loops=)