explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kfhP

Settings
# exclusive inclusive rows x rows loops node
1. 0.060 2,264.470 ↓ 126.0 126 1

Sort (cost=5,521.90..5,521.90 rows=1 width=244) (actual time=2,264.464..2,264.470 rows=126 loops=1)

  • Sort Key: (count(p."sourceName")) DESC
  • Sort Method: quicksort Memory: 54kB
2.          

CTE phones

3. 11.395 2,237.744 ↓ 11,798.0 11,798 1

Nested Loop Left Join (cost=4.26..5,521.83 rows=1 width=210) (actual time=2.362..2,237.744 rows=11,798 loops=1)

4. 3.931 2,190.955 ↓ 11,798.0 11,798 1

Nested Loop (cost=3.68..5,518.51 rows=1 width=202) (actual time=2.353..2,190.955 rows=11,798 loops=1)

5. 73.375 2,151.618 ↓ 11,802.0 11,802 1

Nested Loop (cost=3.12..5,515.18 rows=1 width=177) (actual time=2.340..2,151.618 rows=11,802 loops=1)

  • Join Filter: (c.id = cp.companyid)
6. 115.168 1,764.899 ↓ 156,672.0 156,672 1

Nested Loop (cost=2.54..5,511.14 rows=1 width=162) (actual time=0.085..1,764.899 rows=156,672 loops=1)

7. 53.101 1,016.327 ↓ 158,351.0 158,351 1

Nested Loop (cost=1.97..5,507.82 rows=1 width=138) (actual time=0.073..1,016.327 rows=158,351 loops=1)

8. 25.930 243.940 ↓ 79,920.7 239,762 1

Nested Loop (cost=1.40..5,497.87 rows=3 width=134) (actual time=0.062..243.940 rows=239,762 loops=1)

9. 0.029 0.029 ↑ 1.0 1 1

Index Scan using idx_domain_rawurl on domain d (cost=0.82..3.84 rows=1 width=134) (actual time=0.027..0.029 rows=1 loops=1)

  • Index Cond: (rawurl = 'salesforce.com'::text)
10. 217.981 217.981 ↓ 50.9 239,762 1

Index Scan using idx_entitydomain_domainid on entitydomain ed_1 (cost=0.57..5,446.96 rows=4,707 width=12) (actual time=0.034..217.981 rows=239,762 loops=1)

  • Index Cond: (domainid = d.id)
  • Filter: (id IS NOT NULL)
11. 719.286 719.286 ↑ 1.0 1 239,762

Index Scan using idx_companyentitydomain_entitydomainid on companyentitydomain ced (cost=0.57..3.31 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=239,762)

  • Index Cond: (entitydomainid = ed_1.id)
12. 633.404 633.404 ↑ 1.0 1 158,351

Index Scan using company_pkey on company c (cost=0.57..3.32 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=158,351)

  • Index Cond: (id = ced.companyid)
  • Filter: (name ~~* 'Salesforce%'::text)
  • Rows Removed by Filter: 0
13. 313.344 313.344 ↓ 0.0 0 156,672

Index Scan using idx_companyphone_companyid_phoneid_sourceid_updatedat_desc on companyphone cp (cost=0.57..4.02 rows=2 width=31) (actual time=0.002..0.002 rows=0 loops=156,672)

  • Index Cond: (companyid = ced.companyid)
14. 35.406 35.406 ↑ 1.0 1 11,802

Index Scan using phone_pkey on phone p_1 (cost=0.57..3.32 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=11,802)

  • Index Cond: (id = cp.phoneid)
  • Filter: ((digits !~~ '555%'::text) AND (digits <> ALL ('{1234567890,0000000000,1111111111,2222222222,3333333333,4444444444,5555555555,6666666666,7777777777,8888888888,9999999999,0123456789,0987654321,9876543210}'::text[])))
  • Rows Removed by Filter: 0
15. 35.394 35.394 ↑ 1.0 1 11,798

Index Scan using source_pkey on source s (cost=0.58..3.33 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=11,798)

  • Index Cond: (id = cp.sourceid)
16. 17.015 2,264.410 ↓ 126.0 126 1

HashAggregate (cost=0.04..0.06 rows=1 width=244) (actual time=2,264.353..2,264.410 rows=126 loops=1)

  • Group Key: p.digits, p."sourceName
17. 2,247.395 2,247.395 ↓ 11,798.0 11,798 1

CTE Scan on phones p (cost=0.00..0.02 rows=1 width=236) (actual time=2.364..2,247.395 rows=11,798 loops=1)

Planning time : 3.180 ms
Execution time : 2,264.890 ms