explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LAL8

Settings
# exclusive inclusive rows x rows loops node
1. 0.108 21,418.879 ↓ 15.0 15 1

Nested Loop (cost=1,432,279.17..1,694,731.86 rows=1 width=56) (actual time=15,649.859..21,418.879 rows=15 loops=1)

2. 172.942 21,418.021 ↓ 15.0 15 1

Merge Join (cost=1,432,278.74..1,694,592.07 rows=1 width=64) (actual time=15,649.762..21,418.021 rows=15 loops=1)

  • Merge Cond: (cvp.place_description_id = e.id)
3. 895.209 20,774.335 ↑ 1.1 2,864,170 1

Merge Join (cost=1,388,528.22..1,810,009.47 rows=3,008,072 width=56) (actual time=13,548.005..20,774.335 rows=2,864,170 loops=1)

  • Merge Cond: (e_1.id = cvp.place_description_id)
4. 1,427.474 18,271.978 ↑ 1.1 2,864,170 1

GroupAggregate (cost=1,388,527.79..1,618,560.35 rows=3,008,072 width=40) (actual time=13,547.957..18,271.978 rows=2,864,170 loops=1)

  • Group Key: e_1.id
5. 959.912 16,844.504 ↓ 1.0 3,026,914 1

Merge Join (cost=1,388,527.79..1,565,919.09 rows=3,008,072 width=16) (actual time=13,547.944..16,844.504 rows=3,026,914 loops=1)

  • Merge Cond: (e_1.id = cvp_1.place_description_id)
6. 1,526.271 1,526.271 ↑ 1.0 3,038,514 1

Index Only Scan using place_description_pkey on place_description e_1 (cost=0.43..129,381.70 rows=3,097,706 width=8) (actual time=0.039..1,526.271 rows=3,038,514 loops=1)

  • Heap Fetches: 3038514
7. 304.850 14,358.321 ↓ 1.1 3,026,914 1

Materialize (cost=1,388,521.29..1,402,326.50 rows=2,761,041 width=24) (actual time=13,547.894..14,358.321 rows=3,026,914 loops=1)

8. 2,031.970 14,053.471 ↓ 1.1 3,026,914 1

Sort (cost=1,388,521.29..1,395,423.89 rows=2,761,041 width=24) (actual time=13,547.890..14,053.471 rows=3,026,914 loops=1)

  • Sort Key: cvp_1.place_description_id
  • Sort Method: external merge Disk: 100984kB
9. 1,750.849 12,021.501 ↓ 1.1 3,033,495 1

Hash Join (cost=684,770.09..979,888.35 rows=2,761,041 width=24) (actual time=4,968.358..12,021.501 rows=3,033,495 loops=1)

  • Hash Cond: (cvp_1.place_description_version_id = v_1.id)
10. 1,559.001 8,868.438 ↓ 1.1 3,033,495 1

Hash Join (cost=453,719.65..685,378.16 rows=2,761,041 width=32) (actual time=3,565.701..8,868.438 rows=3,033,495 loops=1)

  • Hash Cond: (v_2.representative_id = cvp_1.place_description_id)
11. 1,740.856 6,310.931 ↑ 1.0 3,047,779 1

Hash Join (cost=344,693.05..523,620.58 rows=3,052,560 width=16) (actual time=2,565.948..6,310.931 rows=3,047,779 loops=1)

  • Hash Cond: (cvp_2.place_description_version_id = v_2.id)
12. 1,557.617 2,957.777 ↑ 1.0 3,047,779 1

Hash Join (cost=109,026.60..227,051.15 rows=3,052,560 width=16) (actual time=945.899..2,957.777 rows=3,047,779 loops=1)

  • Hash Cond: (e_2.id = cvp_2.place_description_id)
13. 455.271 455.271 ↑ 1.0 3,047,779 1

Seq Scan on place_description e_2 (cost=0.00..70,785.06 rows=3,097,706 width=8) (actual time=0.006..455.271 rows=3,047,779 loops=1)

14. 525.476 944.889 ↑ 1.0 3,047,779 1

Hash (cost=55,963.60..55,963.60 rows=3,052,560 width=16) (actual time=944.889..944.889 rows=3,047,779 loops=1)

  • Buckets: 131072 Batches: 64 Memory Usage: 3261kB
15. 419.413 419.413 ↑ 1.0 3,047,779 1

Seq Scan on place_description_current_version_pointer cvp_2 (cost=0.00..55,963.60 rows=3,052,560 width=16) (actual time=0.005..419.413 rows=3,047,779 loops=1)

16. 739.409 1,612.298 ↑ 1.0 4,726,242 1

Hash (cost=153,510.42..153,510.42 rows=4,726,242 width=16) (actual time=1,612.298..1,612.298 rows=4,726,242 loops=1)

  • Buckets: 131072 Batches: 128 Memory Usage: 2733kB
17. 872.889 872.889 ↑ 1.0 4,726,242 1

Seq Scan on place_description_version v_2 (cost=0.00..153,510.42 rows=4,726,242 width=16) (actual time=0.006..872.889 rows=4,726,242 loops=1)

18. 548.854 998.506 ↑ 1.0 3,047,779 1

Hash (cost=55,963.60..55,963.60 rows=3,052,560 width=16) (actual time=998.506..998.506 rows=3,047,779 loops=1)

  • Buckets: 131072 Batches: 64 Memory Usage: 3272kB
19. 449.652 449.652 ↑ 1.0 3,047,779 1

Seq Scan on place_description_current_version_pointer cvp_1 (cost=0.00..55,963.60 rows=3,052,560 width=16) (actual time=0.007..449.652 rows=3,047,779 loops=1)

20. 714.694 1,402.214 ↑ 1.0 4,726,242 1

Hash (cost=153,510.42..153,510.42 rows=4,726,242 width=8) (actual time=1,402.214..1,402.214 rows=4,726,242 loops=1)

  • Buckets: 131072 Batches: 64 Memory Usage: 3913kB
21. 687.520 687.520 ↑ 1.0 4,726,242 1

Seq Scan on place_description_version v_1 (cost=0.00..153,510.42 rows=4,726,242 width=8) (actual time=0.004..687.520 rows=4,726,242 loops=1)

22. 1,607.148 1,607.148 ↑ 1.0 3,038,513 1

Index Scan using place_description_current_version_pointer_ux1 on place_description_current_version_pointer cvp (cost=0.43..116,136.10 rows=3,052,560 width=16) (actual time=0.043..1,607.148 rows=3,038,513 loops=1)

23. 0.018 470.744 ↓ 15.0 15 1

Materialize (cost=43,750.53..43,758.57 rows=1 width=32) (actual time=470.582..470.744 rows=15 loops=1)

24. 0.045 470.726 ↓ 15.0 15 1

Nested Loop (cost=43,750.53..43,758.56 rows=1 width=32) (actual time=470.574..470.726 rows=15 loops=1)

25. 0.014 470.591 ↓ 15.0 15 1

Limit (cost=43,750.10..43,750.11 rows=1 width=8) (actual time=470.549..470.591 rows=15 loops=1)

26. 0.018 470.577 ↓ 15.0 15 1

Group (cost=43,750.10..43,750.11 rows=1 width=8) (actual time=470.547..470.577 rows=15 loops=1)

  • Group Key: v_3.representative_id
27. 0.000 470.559 ↓ 7.5 15 1

Sort (cost=43,750.10..43,750.10 rows=2 width=8) (actual time=470.546..470.559 rows=15 loops=1)

  • Sort Key: v_3.representative_id
  • Sort Method: quicksort Memory: 25kB
28. 13.438 470.630 ↓ 7.5 15 1

Gather (cost=43,749.88..43,750.09 rows=2 width=8) (actual time=466.501..470.630 rows=15 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
29. 0.005 457.192 ↓ 5.0 5 3 / 3

Group (cost=42,749.88..42,749.89 rows=1 width=8) (actual time=457.188..457.192 rows=5 loops=3)

  • Group Key: v_3.representative_id
30. 1.406 457.187 ↓ 5.0 5 3 / 3

Sort (cost=42,749.88..42,749.88 rows=1 width=8) (actual time=457.187..457.187 rows=5 loops=3)

  • Sort Key: v_3.representative_id
  • Sort Method: quicksort Memory: 25kB
31. 0.017 455.781 ↓ 5.0 5 3 / 3

Nested Loop (cost=1,197.84..42,749.87 rows=1 width=8) (actual time=236.004..455.781 rows=5 loops=3)

32. 0.019 455.714 ↓ 5.0 5 3 / 3

Nested Loop (cost=1,197.41..42,741.48 rows=1 width=16) (actual time=235.982..455.714 rows=5 loops=3)

33. 0.044 455.635 ↓ 5.0 5 3 / 3

Hash Join (cost=1,196.98..42,733.08 rows=1 width=24) (actual time=235.950..455.635 rows=5 loops=3)

  • Hash Cond: (e_3.data_source_id = ds.id)
34. 0.037 455.569 ↑ 13.2 6 3 / 3

Nested Loop (cost=1,188.80..42,724.69 rows=79 width=32) (actual time=174.777..455.569 rows=6 loops=3)

35. 236.110 455.454 ↑ 13.2 6 3 / 3

Hash Join (cost=1,188.37..42,684.10 rows=79 width=32) (actual time=174.752..455.454 rows=6 loops=3)

  • Hash Cond: (cvp_3.place_description_version_id = v_3.id)
36. 205.320 205.320 ↑ 1.3 1,015,926 3 / 3

Parallel Seq Scan on place_description_current_version_pointer cvp_3 (cost=0.00..38,157.00 rows=1,271,900 width=16) (actual time=0.006..205.320 rows=1,015,926 loops=3)

37. 0.009 14.024 ↑ 13.9 21 3 / 3

Hash (cost=1,184.72..1,184.72 rows=292 width=32) (actual time=14.024..14.024 rows=21 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
38. 0.103 14.015 ↑ 13.9 21 3 / 3

Bitmap Heap Scan on place_description_version v_3 (cost=58.26..1,184.72 rows=292 width=32) (actual time=13.942..14.015 rows=21 loops=3)

  • Recheck Cond: ((name)::text ~~* 'pias%'::text)
  • Rows Removed by Index Recheck: 5
  • Filter: (confidence >= '0'::numeric)
  • Heap Blocks: exact=26
39. 13.912 13.912 ↑ 11.2 26 3 / 3

Bitmap Index Scan on place_description_version_trigram_ix5 (cost=0.00..58.19 rows=292 width=0) (actual time=13.912..13.912 rows=26 loops=3)

  • Index Cond: ((name)::text ~~* 'pias%'::text)
40. 0.078 0.078 ↑ 1.0 1 18 / 3

Index Scan using place_description_pkey on place_description e_3 (cost=0.43..0.51 rows=1 width=16) (actual time=0.013..0.013 rows=1 loops=18)

  • Index Cond: (id = cvp_3.place_description_id)
41. 0.003 0.022 ↑ 1.0 1 3 / 3

Hash (cost=8.17..8.17 rows=1 width=8) (actual time=0.022..0.022 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
42. 0.019 0.019 ↑ 1.0 1 3 / 3

Index Scan using data_source_ux1 on data_source ds (cost=0.15..8.17 rows=1 width=8) (actual time=0.015..0.019 rows=1 loops=3)

  • Index Cond: ((name)::text = 'SAFEGRAPH'::text)
43. 0.060 0.060 ↑ 1.0 1 15 / 3

Index Only Scan using address_pkey on address a (cost=0.43..8.39 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=15)

  • Index Cond: (id = v_3.address_id)
  • Heap Fetches: 5
44. 0.050 0.050 ↑ 1.0 1 15 / 3

Index Only Scan using geocode_pkey on geocode g (cost=0.43..8.39 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=15)

  • Index Cond: (id = v_3.geocode_id)
  • Heap Fetches: 5
45. 0.090 0.090 ↑ 1.0 1 15

Index Scan using place_description_pkey on place_description e (cost=0.43..8.45 rows=1 width=24) (actual time=0.006..0.006 rows=1 loops=15)

  • Index Cond: (id = v_3.representative_id)
46. 0.165 0.165 ↑ 1.0 1 15

Index Only Scan using place_description_version_pkey on place_description_version v (cost=0.43..0.62 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=15)

  • Index Cond: (id = cvp.place_description_version_id)
  • Heap Fetches: 15
47.          

SubPlan (for Nested Loop)

48. 0.210 0.585 ↑ 1.0 1 15

Aggregate (cost=139.16..139.17 rows=1 width=32) (actual time=0.038..0.039 rows=1 loops=15)

49. 0.060 0.375 ↑ 10.0 1 15

Nested Loop (cost=1.29..139.11 rows=10 width=24) (actual time=0.024..0.025 rows=1 loops=15)

50. 0.105 0.270 ↑ 10.0 1 15

Nested Loop (cost=0.86..132.95 rows=10 width=32) (actual time=0.017..0.018 rows=1 loops=15)

51. 0.090 0.090 ↑ 10.0 1 15

Index Scan using place_description_pkey on place_description e_4 (cost=0.43..48.48 rows=10 width=24) (actual time=0.006..0.006 rows=1 loops=15)

  • Index Cond: (id = ANY ((array_agg(e_2.id))))
52. 0.075 0.075 ↑ 1.0 1 15

Index Scan using place_description_current_version_pointer_ux1 on place_description_current_version_pointer cvp_4 (cost=0.43..8.45 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=15)

  • Index Cond: (place_description_id = e_4.id)
53. 0.045 0.045 ↑ 1.0 1 15

Index Only Scan using place_description_version_pkey on place_description_version v_4 (cost=0.43..0.62 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=15)

  • Index Cond: (id = cvp_4.place_description_version_id)
  • Heap Fetches: 15
Planning time : 4.156 ms
Execution time : 21,437.470 ms