explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ifqN

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 2.066 ↑ 62.9 36 1

Nested Loop Left Join (cost=37.52..619,774.98 rows=2,266 width=288) (actual time=0.321..2.066 rows=36 loops=1)

2. 0.028 0.860 ↑ 62.9 36 1

Nested Loop Left Join (cost=36.23..22,849.35 rows=2,263 width=240) (actual time=0.079..0.860 rows=36 loops=1)

3. 0.023 0.688 ↑ 62.9 36 1

Nested Loop Left Join (cost=35.80..21,759.75 rows=2,263 width=224) (actual time=0.068..0.688 rows=36 loops=1)

4. 0.019 0.521 ↑ 62.9 36 1

Nested Loop (cost=35.37..20,607.65 rows=2,263 width=173) (actual time=0.055..0.521 rows=36 loops=1)

5. 0.019 0.358 ↑ 62.9 36 1

Nested Loop (cost=34.94..19,008.85 rows=2,263 width=113) (actual time=0.044..0.358 rows=36 loops=1)

6. 0.021 0.195 ↑ 62.8 36 1

Hash Join (cost=34.51..17,875.98 rows=2,260 width=113) (actual time=0.035..0.195 rows=36 loops=1)

  • Hash Cond: (e.data_source_id = ds.id)
7. 0.044 0.165 ↑ 62.8 36 1

Nested Loop (cost=0.43..17,835.95 rows=2,260 width=81) (actual time=0.017..0.165 rows=36 loops=1)

8. 0.013 0.013 ↑ 62.8 36 1

Seq Scan on tmp_place_descriptions tmp (cost=0.00..32.60 rows=2,260 width=8) (actual time=0.008..0.013 rows=36 loops=1)

9. 0.108 0.108 ↑ 1.0 1 36

Index Scan using place_description_pkey on place_description e (cost=0.43..7.88 rows=1 width=73) (actual time=0.003..0.003 rows=1 loops=36)

  • Index Cond: (id = tmp.id)
10. 0.005 0.009 ↑ 76.4 14 1

Hash (cost=20.70..20.70 rows=1,070 width=40) (actual time=0.009..0.009 rows=14 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
11. 0.004 0.004 ↑ 76.4 14 1

Seq Scan on data_source ds (cost=0.00..20.70 rows=1,070 width=40) (actual time=0.002..0.004 rows=14 loops=1)

12. 0.144 0.144 ↑ 1.0 1 36

Index Scan using place_description_current_version_pointer_ux1 on place_description_current_version_pointer cvp (cost=0.43..0.50 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=36)

  • Index Cond: (place_description_id = e.id)
13. 0.144 0.144 ↑ 1.0 1 36

Index Scan using place_description_version_pkey on place_description_version v (cost=0.43..0.71 rows=1 width=68) (actual time=0.004..0.004 rows=1 loops=36)

  • Index Cond: (id = cvp.place_description_version_id)
14. 0.144 0.144 ↑ 1.0 1 36

Index Scan using address_pkey on address a (cost=0.43..0.51 rows=1 width=59) (actual time=0.004..0.004 rows=1 loops=36)

  • Index Cond: (v.address_id = id)
15. 0.144 0.144 ↑ 1.0 1 36

Index Scan using geocode_pkey on geocode g (cost=0.43..0.48 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=36)

  • Index Cond: (v.geocode_id = id)
16. 0.036 0.360 ↑ 1.0 1 36

Nested Loop (cost=1.29..1.49 rows=1 width=24) (actual time=0.010..0.010 rows=1 loops=36)

17. 0.036 0.216 ↑ 1.0 1 36

Nested Loop (cost=0.86..1.00 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=36)

18. 0.108 0.108 ↑ 1.0 1 36

Index Scan using place_description_pkey on place_description e_1 (cost=0.43..0.49 rows=1 width=24) (actual time=0.002..0.003 rows=1 loops=36)

  • Index Cond: (v.representative_id = id)
19. 0.072 0.072 ↑ 1.0 1 36

Index Scan using place_description_current_version_pointer_ux1 on place_description_current_version_pointer cvp_1 (cost=0.43..0.50 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=36)

  • Index Cond: (place_description_id = e_1.id)
20. 0.108 0.108 ↑ 1.0 1 36

Index Only Scan using place_description_version_pkey on place_description_version v_1 (cost=0.43..0.49 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=36)

  • Index Cond: (id = cvp_1.place_description_version_id)
  • Heap Fetches: 3
21.          

SubPlan (for Nested Loop Left Join)

22. 0.000 0.792 ↑ 1.0 1 36

Aggregate (cost=261.92..261.93 rows=1 width=32) (actual time=0.022..0.022 rows=1 loops=36)

23.          

Initplan (for Aggregate)

24. 0.036 0.180 ↑ 1.0 1 36

Aggregate (cost=89.88..89.89 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=36)

25. 0.144 0.144 ↑ 47.0 1 36

Index Only Scan using place_description_match_ux1 on place_description_match m (cost=0.43..89.76 rows=47 width=8) (actual time=0.004..0.004 rows=1 loops=36)

  • Index Cond: (place_description_version_id = v.id)
  • Heap Fetches: 29
26. 0.029 0.684 ↑ 10.0 1 36

Hash Join (cost=35.37..171.98 rows=10 width=24) (actual time=0.013..0.019 rows=1 loops=36)

  • Hash Cond: (e_2.data_source_id = matched_pd_ds.id)
27. 0.057 0.648 ↑ 10.0 1 36

Nested Loop (cost=1.29..137.88 rows=10 width=32) (actual time=0.012..0.018 rows=1 loops=36)

28. 0.273 0.504 ↑ 10.0 1 36

Nested Loop (cost=0.86..132.95 rows=10 width=40) (actual time=0.010..0.014 rows=1 loops=36)

29. 0.144 0.144 ↑ 10.0 1 36

Index Scan using place_description_pkey on place_description e_2 (cost=0.43..48.48 rows=10 width=32) (actual time=0.002..0.004 rows=1 loops=36)

  • Index Cond: (id = ANY (COALESCE($1, '{}'::bigint[])))
30. 0.087 0.087 ↑ 1.0 1 29

Index Scan using place_description_current_version_pointer_ux1 on place_description_current_version_pointer cvp_2 (cost=0.43..8.45 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=29)

  • Index Cond: (place_description_id = e_2.id)
31. 0.087 0.087 ↑ 1.0 1 29

Index Only Scan using place_description_version_pkey on place_description_version v_2 (cost=0.43..0.49 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=29)

  • Index Cond: (id = cvp_2.place_description_version_id)
  • Heap Fetches: 4
32. 0.004 0.007 ↑ 76.4 14 1

Hash (cost=20.70..20.70 rows=1,070 width=8) (actual time=0.007..0.007 rows=14 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
33. 0.003 0.003 ↑ 76.4 14 1

Seq Scan on data_source matched_pd_ds (cost=0.00..20.70 rows=1,070 width=8) (actual time=0.002..0.003 rows=14 loops=1)

Planning time : 3.472 ms
Execution time : 2.265 ms