explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Lvpr : slow non-analyze

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

GroupAggregate (cost=4,249,189.12..4,253,246.27 rows=162,286 width=89) (actual rows= loops=)

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

Sort (cost=4,249,189.12..4,249,594.83 rows=162,286 width=50) (actual rows= loops=)

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

Gather (cost=1,236,539.91..4,235,144.74 rows=162,286 width=50) (actual rows= loops=)

  • Workers Planned: 2
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,235,539.91..4,217,916.14 rows=67,619 width=50) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,235,539.34..3,533,984.40 rows=93,319 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,538.77..2,472,886.72 rows=144,732 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,363.30 rows=28,946,530 width=42) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=1,233,729.62..1,233,729.62 rows=144,732 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,729.62 rows=144,732 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[])))