explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cXdO : still slow?

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=4,248,866.96..4,252,924.41 rows=162,298 width=89) (actual rows= loops=)

  • Group Key: ncm.id
2. 0.000 0.000 ↓ 0.0

Sort (cost=4,248,866.96..4,249,272.71 rows=162,298 width=50) (actual rows= loops=)

  • Sort Key: ncm.id
3. 0.000 0.000 ↓ 0.0

Gather (cost=1,236,487.58..4,234,821.46 rows=162,298 width=50) (actual rows= loops=)

  • Workers Planned: 2
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,235,487.58..4,217,591.66 rows=67,624 width=50) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,235,487.01..3,533,733.06 rows=93,309 width=59) (actual rows= loops=)

  • Join Filter: (((NOT ncm.filter_out) OR (ucm.source = ANY ('{lex_metadata,lex_sigblock}'::text[]))) AND (ncm.id = ucm.id))
6. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=1,235,486.44..2,472,781.78 rows=144,712 width=76) (actual rows= loops=)

  • Hash Cond: (ncm_other.attorney_cluster_id = ncm.id)
7. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on normalized_counsel_mention_20191023174259 ncm_other (cost=0.00..1,161,321.63 rows=28,942,363 width=42) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=1,233,677.54..1,233,677.54 rows=144,712 width=34) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on normalized_counsel_mention_20191023174259 ncm (cost=0.00..1,233,677.54 rows=144,712 width=34) (actual rows= loops=)

  • Filter: (id = attorney_cluster_id)
10. 0.000 0.000 ↓ 0.0

Index Scan using unnormalized_counsel_mention_pkey on unnormalized_counsel_mention ucm (cost=0.57..7.32 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (id = ncm_other.attorney_cluster_id)
11. 0.000 0.000 ↓ 0.0

Index Scan using unnormalized_counsel_mention_pkey on unnormalized_counsel_mention ucm_other (cost=0.57..7.32 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (id = ncm_other.id)
  • Filter: ((NOT ncm_other.filter_out) OR (source = ANY ('{lex_metadata,lex_sigblock}'::text[])))