explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wpVU

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

Unique (cost=3,748,981.30..3,748,981.31 rows=1 width=53) (actual rows= loops=)

  • Functions: 128
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
2. 0.000 0.000 ↓ 0.0

Sort (cost=3,748,981.30..3,748,981.30 rows=1 width=53) (actual rows= loops=)

  • Sort Key: farm.id, farm.name, farm.name_loc, farm.name_loc2
3. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=52,790.23..3,748,981.29 rows=1 width=53) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52,789.09..3,748,950.65 rows=1 width=69) (actual rows= loops=)

  • Join Filter: (pm_10.pest_id = pest.id)
5. 0.000 0.000 ↓ 0.0

Index Only Scan using entity_type_pkey on entity_type pest (cost=0.29..31,773.09 rows=9,862 width=8) (actual rows= loops=)

  • Filter: (id <> ALL ('{72158452898922497,72155119348154369,72158452900888577}'::bigint[]))
6. 0.000 0.000 ↓ 0.0

Materialize (cost=52,788.81..3,717,029.63 rows=1 width=61) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52,788.81..3,717,029.63 rows=1 width=61) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52,788.52..3,717,022.64 rows=1 width=77) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52,788.38..3,717,017.36 rows=1 width=85) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=52,788.09..3,717,010.31 rows=1 width=85) (actual rows= loops=)

  • Hash Cond: (pm_10.crop_id = et2.id)
11. 0.000 0.000 ↓ 0.0

Gather (cost=52,645.94..3,716,867.56 rows=222 width=77) (actual rows= loops=)

  • Workers Planned: 2
12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=51,645.94..3,715,845.36 rows=92 width=77) (actual rows= loops=)

  • Hash Cond: (pm_10.owner_loc_id = farm.id)
  • Filter: ((farm.id IS NULL) OR (farm.id = '72153897268936705'::bigint))
13. 0.000 0.000 ↓ 0.0

Parallel Append (cost=50,687.52..3,709,451.80 rows=2,070,050 width=32) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on pest_measurement_2019_10 pm_10 (cost=59,568.14..450,898.61 rows=75,748 width=32) (actual rows= loops=)

  • Recheck Cond: ((owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
  • Filter: (start_time >= '2018-12-04 00:00:00'::timestamp without time zone)
15. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=59,568.14..59,568.14 rows=181,796 width=0) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_10_owner_loc_id_idx (cost=0.00..29,059.46 rows=1,622,211 width=0) (actual rows= loops=)

  • Index Cond: (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[]))
17. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_10_project_id_idx (cost=0.00..30,417.53 rows=1,645,480 width=0) (actual rows= loops=)

  • Index Cond: (project_id = '72153897141141505'::bigint)
18. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on pest_measurement_2019_09 pm_9 (cost=50,687.52..379,689.45 rows=63,132 width=32) (actual rows= loops=)

  • Recheck Cond: ((owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
  • Filter: (start_time >= '2018-12-04 00:00:00'::timestamp without time zone)
19. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=50,687.52..50,687.52 rows=151,517 width=0) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_09_owner_loc_id_idx (cost=0.00..24,762.94 rows=1,381,610 width=0) (actual rows= loops=)

  • Index Cond: (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[]))
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_09_project_id_idx (cost=0.00..25,848.57 rows=1,398,418 width=0) (actual rows= loops=)

  • Index Cond: (project_id = '72153897141141505'::bigint)
22. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on pest_measurement_2019_11 pm_11 (cost=45,456.23..345,284.41 rows=43,312 width=32) (actual rows= loops=)

  • Recheck Cond: ((owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
  • Filter: (start_time >= '2018-12-04 00:00:00'::timestamp without time zone)
23. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=45,456.23..45,456.23 rows=103,949 width=0) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_11_owner_loc_id_idx (cost=0.00..22,330.31 rows=1,236,993 width=0) (actual rows= loops=)

  • Index Cond: (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[]))
25. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_11_project_id_idx (cost=0.00..23,073.70 rows=1,248,168 width=0) (actual rows= loops=)

  • Index Cond: (project_id = '72153897141141505'::bigint)
26. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on pest_measurement_2019_12 pm_12 (cost=37,570.47..271,285.96 rows=30,776 width=32) (actual rows= loops=)

  • Recheck Cond: ((owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
  • Filter: (start_time >= '2018-12-04 00:00:00'::timestamp without time zone)
27. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=37,570.47..37,570.47 rows=73,862 width=0) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_12_owner_loc_id_idx (cost=0.00..18,396.76 rows=1,015,986 width=0) (actual rows= loops=)

  • Index Cond: (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[]))
29. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2019_12_project_id_idx (cost=0.00..19,136.53 rows=1,035,212 width=0) (actual rows= loops=)

  • Index Cond: (project_id = '72153897141141505'::bigint)
30. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on pest_measurement_2020_01 pm_13 (cost=20,699.57..104,939.76 rows=12,251 width=32) (actual rows= loops=)

  • Recheck Cond: ((owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
  • Filter: (start_time >= '2018-12-04 00:00:00'::timestamp without time zone)
31. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=20,699.57..20,699.57 rows=29,402 width=0) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2020_01_owner_loc_id_idx (cost=0.00..10,145.35 rows=556,864 width=0) (actual rows= loops=)

  • Index Cond: (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[]))
33. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pest_measurement_2020_01_project_id_idx (cost=0.00..10,539.27 rows=569,978 width=0) (actual rows= loops=)

  • Index Cond: (project_id = '72153897141141505'::bigint)
34. 0.000 0.000 ↓ 0.0

Parallel Index Scan using pest_measurement_2020_02_owner_loc_id_idx on pest_measurement_2020_02 pm_14 (cost=0.42..12.87 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[]))
  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (project_id = '72153897141141505'::bigint))
35. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_08 pm_8 (cost=0.00..451,772.01 rows=268,020 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
36. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_07 pm_7 (cost=0.00..346,510.67 rows=447,488 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
37. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_05 pm_5 (cost=0.00..255,684.40 rows=282,335 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
38. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_06 pm_6 (cost=0.00..214,413.05 rows=272,662 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
39. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_04 pm_4 (cost=0.00..191,879.49 rows=171,398 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
40. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2018_12 pm (cost=0.00..184,047.05 rows=62,210 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
41. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_01 pm_1 (cost=0.00..183,096.15 rows=132,338 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
42. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_02 pm_2 (cost=0.00..167,081.98 rows=96,371 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
43. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on pest_measurement_2019_03 pm_3 (cost=0.00..152,505.66 rows=112,008 width=32) (actual rows= loops=)

  • Filter: ((start_time >= '2018-12-04 00:00:00'::timestamp without time zone) AND (owner_loc_id = ANY ('{72153897268936705,72158214991249409}'::bigint[])) AND (project_id = '72153897141141505'::bigint))
44. 0.000 0.000 ↓ 0.0

Hash (cost=678.74..678.74 rows=22,374 width=53) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on location farm (cost=0.00..678.74 rows=22,374 width=53) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Hash (cost=141.54..141.54 rows=49 width=8) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.67..141.54 rows=49 width=8) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Index Scan using entity_type_pkey on entity_type et3 (cost=0.29..8.30 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (id = 200155)
49. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on entity_type et2 (cost=12.38..132.75 rows=49 width=18) (actual rows= loops=)

  • Recheck Cond: ((code)::text ~~ ((et3.code)::text || '%'::text))
50. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on entity_type_code_trgm_idx (cost=0.00..12.37 rows=49 width=0) (actual rows= loops=)

  • Index Cond: ((code)::text ~~ ((et3.code)::text || '%'::text))
51. 0.000 0.000 ↓ 0.0

Index Scan using location_pkey on location plot (cost=0.29..7.06 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = pm_10.location_id)
52. 0.000 0.000 ↓ 0.0

Index Scan using location_type_pkey on location_type plot_type (cost=0.14..5.17 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = plot.type_id)
  • Filter: (main_type = ANY ('{12,3}'::integer[]))
53. 0.000 0.000 ↓ 0.0

Index Only Scan using entity_type_pkey on entity_type crop (cost=0.29..6.99 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = pm_10.crop_id)
54. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.14..30.63 rows=1 width=16) (actual rows= loops=)

  • Join Filter: ((et2_1.code)::text ~~ ((et3_1.code)::text || '%'::text))
55. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=0.86..22.31 rows=1 width=26) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Index Scan using entity_type_pkey on entity_type et2_1 (cost=0.29..6.99 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (id = pm_10.pest_id)
57. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..15.31 rows=1 width=8) (actual rows= loops=)

  • Join Filter: ((et2_2.code)::text ~~ ((et3_2.code)::text || '%'::text))
58. 0.000 0.000 ↓ 0.0

Index Scan using entity_type_pkey on entity_type et2_2 (cost=0.29..6.99 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (id = et2_1.id)
59. 0.000 0.000 ↓ 0.0

Index Only Scan using entity_type_code on entity_type et3_2 (cost=0.29..8.30 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (code = 'PT'::text)
60. 0.000 0.000 ↓ 0.0

Index Scan using entity_type_pkey on entity_type et3_1 (cost=0.29..8.30 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (id = '72158239034769409'::bigint)JIT: