explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rOau

Settings
# exclusive inclusive rows x rows loops node
1. 0.091 44,550.546 ↑ 1.0 15 1

Append (cost=456,245.07..1,344,435.42 rows=15 width=18) (actual time=16,008.367..44,550.546 rows=15 loops=1)

2. 0.070 16,008.439 ↑ 1.0 5 1

Limit (cost=456,245.07..456,245.08 rows=5 width=18) (actual time=16,008.360..16,008.439 rows=5 loops=1)

3. 0.418 16,008.369 ↑ 60.0 5 1

Sort (cost=456,245.07..456,245.82 rows=300 width=18) (actual time=16,008.351..16,008.369 rows=5 loops=1)

  • Sort Key: (count(DISTINCT mi.checksum_sid))
  • Sort Method: top-N heapsort Memory: 25kB
4. 947.969 16,007.951 ↑ 3.0 100 1

GroupAggregate (cost=449,481.98..456,240.09 rows=300 width=18) (actual time=14,170.250..16,007.951 rows=100 loops=1)

  • Group Key: fact.account_sid, fact.activity_type
5. 1,878.640 15,059.982 ↑ 2.2 309,257 1

Sort (cost=449,481.98..451,170.75 rows=675,511 width=14) (actual time=14,166.343..15,059.982 rows=309,257 loops=1)

  • Sort Key: fact.account_sid, fact.activity_type
  • Sort Method: external merge Disk: 7832kB
6. 4,867.059 13,181.342 ↑ 2.2 309,257 1

Hash Join (cost=18,416.32..372,527.03 rows=675,511 width=14) (actual time=2,953.872..13,181.342 rows=309,257 loops=1)

  • Hash Cond: (mi.checksum_sid = fact.checksum_sid)
7. 5,362.794 5,362.794 ↓ 1.0 1,252,026 1

Seq Scan on meeting_inheritance mi (cost=0.00..281,819.00 rows=1,223,488 width=4) (actual time=0.146..5,362.794 rows=1,252,026 loops=1)

  • Filter: ((NOT is_internal) AND (NOT is_blacklist) AND (NOT is_partner))
  • Rows Removed by Filter: 8747974
8. 2,951.489 2,951.489 ↑ 1.0 501,392 1

Hash (cost=9,699.92..9,699.92 rows=501,392 width=14) (actual time=2,951.483..2,951.489 rows=501,392 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3976kB
  • -> Seq Scan on derived_activity_account_fact fact (cost=0.00..9699.92 rows=501392 width=14) (actual time=0.013..1479.095 rows=
9. 0.067 14,486.665 ↑ 1.0 5 1

Limit (cost=442,295.61..442,295.62 rows=5 width=18) (actual time=14,486.586..14,486.665 rows=5 loops=1)

10. 0.376 14,486.598 ↑ 60.0 5 1

Sort (cost=442,295.61..442,296.36 rows=300 width=18) (actual time=14,486.580..14,486.598 rows=5 loops=1)

  • Sort Key: (count(DISTINCT ei.checksum_sid))
  • Sort Method: top-N heapsort Memory: 25kB
11. 516.203 14,486.222 ↑ 3.0 100 1

GroupAggregate (cost=435,330.74..442,290.62 rows=300 width=18) (actual time=13,508.950..14,486.222 rows=100 loops=1)

  • Group Key: fact_1.account_sid, fact_1.activity_type
12. 1,043.357 13,970.019 ↑ 4.1 168,963 1

Sort (cost=435,330.74..437,069.96 rows=695,688 width=14) (actual time=13,487.412..13,970.019 rows=168,963 loops=1)

  • Sort Key: fact_1.account_sid, fact_1.activity_type
  • Sort Method: external merge Disk: 4288kB
13. 4,555.179 12,926.662 ↑ 4.1 168,963 1

Hash Join (cost=18,416.32..355,931.40 rows=695,688 width=14) (actual time=2,953.096..12,926.662 rows=168,963 loops=1)

  • Hash Cond: (ei.checksum_sid = fact_1.checksum_sid)
14. 5,421.255 5,421.255 ↓ 1.0 1,248,389 1

Seq Scan on email_inheritance ei (cost=0.00..263,935.35 rows=1,244,568 width=4) (actual time=1.442..5,421.255 rows=1,248,389 loops=1)

  • Filter: ((NOT is_internal) AND (NOT is_blacklist) AND (NOT is_partner))
  • Rows Removed by Filter: 8751611
15. 2,950.228 2,950.228 ↑ 1.0 501,392 1

Hash (cost=9,699.92..9,699.92 rows=501,392 width=14) (actual time=2,950.222..2,950.228 rows=501,392 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3976kB
  • -> Seq Scan on derived_activity_account_fact fact_1 (cost=0.00..9699.92 rows=501392 width=14) (actual time=0.015..1478.189 row
16. 0.068 14,055.351 ↑ 1.0 5 1

Limit (cost=445,894.56..445,894.57 rows=5 width=18) (actual time=14,055.274..14,055.351 rows=5 loops=1)

17. 0.365 14,055.283 ↑ 60.0 5 1

Sort (cost=445,894.56..445,895.31 rows=300 width=18) (actual time=14,055.266..14,055.283 rows=5 loops=1)

  • Sort Key: (count(DISTINCT pi.checksum_sid))
  • Sort Method: top-N heapsort Memory: 25kB
18. 459.162 14,054.918 ↑ 3.0 100 1

GroupAggregate (cost=437,965.61..445,889.58 rows=300 width=18) (actual time=13,181.718..14,054.918 rows=100 loops=1)

  • Group Key: fact_2.account_sid, fact_2.activity_type
19. 930.604 13,595.756 ↑ 5.3 150,202 1

Sort (cost=437,965.61..439,945.85 rows=792,097 width=14) (actual time=13,166.166..13,595.756 rows=150,202 loops=1)

  • Sort Key: fact_2.account_sid, fact_2.activity_type
  • Sort Method: external merge Disk: 3808kB
20. 4,412.116 12,665.152 ↑ 5.3 150,202 1

Hash Join (cost=18,416.32..346,820.65 rows=792,097 width=14) (actual time=2,918.998..12,665.152 rows=150,202 loops=1)

  • Hash Cond: (pi.checksum_sid = fact_2.checksum_sid)
21. 5,335.577 5,335.577 ↓ 1.0 1,249,718 1

Seq Scan on phone_inheritance pi (cost=0.00..253,847.00 rows=1,244,831 width=4) (actual time=1.279..5,335.577 rows=1,249,718 loops=1)

  • Filter: ((NOT is_internal) AND (NOT is_blacklist) AND (NOT is_partner))
  • Rows Removed by Filter: 8750282
22. 2,917.459 2,917.459 ↑ 1.0 501,392 1

Hash (cost=9,699.92..9,699.92 rows=501,392 width=14) (actual time=2,917.454..2,917.459 rows=501,392 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3976kB
  • -> Seq Scan on derived_activity_account_fact fact_2 (cost=0.00..9699.92 rows=501392 width=14) (actual time=0.015..1458.911 row