explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ENjQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.035 6,852.014 ↑ 127,778.2 29 1

Merge Join (cost=599,860.05..722,105.31 rows=3,705,569 width=164) (actual time=6,851.972..6,852.014 rows=29 loops=1)

  • Merge Cond: ((('0'::text || (d.so_moi)::text)) = ("left"((c.phone_correct)::text, ("position"((c.phone_correct)::text, ' '::text) - 1))))
2. 0.128 0.193 ↑ 16.3 63 1

Sort (cost=81.17..83.74 rows=1,030 width=13) (actual time=0.182..0.193 rows=63 loops=1)

  • Sort Key: (('0'::text || (d.so_moi)::text))
  • Sort Method: quicksort Memory: 29kB
3. 0.065 0.065 ↑ 16.3 63 1

Seq Scan on "Ma_Vung_Co_Dinh_Di_Dong_SDT" d (cost=0.00..29.62 rows=1,030 width=13) (actual time=0.022..0.065 rows=63 loops=1)

  • Filter: ((note)::text = 'co_dinh'::text)
  • Rows Removed by Filter: 33
4. 0.007 6,851.786 ↑ 23,984.3 30 1

Materialize (cost=599,778.88..603,376.52 rows=719,528 width=122) (actual time=6,851.777..6,851.786 rows=30 loops=1)

5. 1.417 6,851.779 ↑ 23,984.3 30 1

Sort (cost=599,778.88..601,577.70 rows=719,528 width=122) (actual time=6,851.776..6,851.779 rows=30 loops=1)

  • Sort Key: ("left"((c.phone_correct)::text, ("position"((c.phone_correct)::text, ' '::text) - 1)))
  • Sort Method: quicksort Memory: 562kB
6. 2.091 6,850.362 ↑ 372.4 1,932 1

Hash Join (cost=412,416.04..436,323.71 rows=719,528 width=122) (actual time=5,254.237..6,850.362 rows=1,932 loops=1)

  • Hash Cond: (a.province_uuid = b.uuid)
7. 547.576 6,832.292 ↑ 371.1 1,934 1

Merge Join (cost=411,392.42..423,619.49 rows=717,652 width=108) (actual time=5,237.999..6,832.292 rows=1,934 loops=1)

  • Merge Cond: (c.phone_orig = a.phone)
8. 1,639.753 1,750.028 ↑ 1.0 284,018 1

Sort (cost=42,076.55..42,787.38 rows=284,330 width=21) (actual time=1,259.532..1,750.028 rows=284,018 loops=1)

  • Sort Key: c.phone_orig
  • Sort Method: external merge Disk: 9,472kB
9. 110.275 110.275 ↑ 1.0 284,018 1

Seq Scan on phone_number_correct_v2 c (cost=0.00..10,489.23 rows=284,330 width=21) (actual time=0.206..110.275 rows=284,018 loops=1)

  • Filter: ((phone_correct)::text <> ''::text)
  • Rows Removed by Filter: 67,600
10. 102.869 4,534.688 ↑ 1.0 745,303 1

Materialize (cost=367,343.79..371,078.23 rows=746,888 width=98) (actual time=3,563.659..4,534.688 rows=745,303 loops=1)

11. 3,190.953 4,431.819 ↑ 1.0 745,238 1

Sort (cost=367,343.79..369,211.01 rows=746,888 width=98) (actual time=3,563.656..4,431.819 rows=745,238 loops=1)

  • Sort Key: a.phone
  • Sort Method: external merge Disk: 79,544kB
12. 1,240.866 1,240.866 ↑ 1.0 746,731 1

Seq Scan on organization a (cost=0.00..212,785.88 rows=746,888 width=98) (actual time=0.022..1,240.866 rows=746,731 loops=1)

13. 9.700 15.979 ↑ 1.0 21,405 1

Hash (cost=756.05..756.05 rows=21,405 width=55) (actual time=15.978..15.979 rows=21,405 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 2,079kB
14. 6.279 6.279 ↑ 1.0 21,405 1

Seq Scan on country_location b (cost=0.00..756.05 rows=21,405 width=55) (actual time=0.008..6.279 rows=21,405 loops=1)

Planning time : 1.929 ms
Execution time : 6,873.002 ms