explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ltg

Settings
# exclusive inclusive rows x rows loops node
1. 37.126 109,349.160 ↓ 2.8 81,278 1

Gather (cost=8,753.55..243,726.72 rows=29,110 width=136) (actual time=422.768..109,349.160 rows=81,278 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
2. 156.253 109,312.034 ↓ 6.7 81,278 1

Parallel Hash Left Join (cost=7,753.55..239,815.72 rows=12,129 width=136) (actual time=422.078..109,312.034 rows=81,278 loops=1)

  • Hash Cond: (attorney_representation_cache.law_firm_cluster_id = law_firm_cache_1.id)
3. 124.768 108,764.274 ↓ 6.7 81,278 1

Nested Loop Left Join (cost=0.85..231,967.00 rows=12,129 width=113) (actual time=28.478..108,764.274 rows=81,278 loops=1)

4. 79.744 106,851.390 ↓ 6.7 81,278 1

Nested Loop Left Join (cost=0.85..216,484.37 rows=12,129 width=94) (actual time=28.434..106,851.390 rows=81,278 loops=1)

5. 110.765 29,589.086 ↓ 2.6 23,940 1

Nested Loop (cost=0.85..114,905.49 rows=9,269 width=78) (actual time=7.666..29,589.086 rows=23,940 loops=1)

6. 63.816 21,721.761 ↓ 2.4 23,940 1

Nested Loop (cost=0.29..107,863.54 rows=9,932 width=60) (actual time=5.877..21,721.761 rows=23,940 loops=1)

7. 10.111 1,587.879 ↓ 2.6 25,797 1

Parallel Append (cost=0.29..27,965.93 rows=9,933 width=8) (actual time=4.054..1,587.879 rows=25,797 loops=1)

8. 1,576.949 1,576.949 ↓ 1.8 25,797 1

Parallel Index Scan using ix_pacer_metadata_party_mention_case_id on pacer_metadata_party_mention pacer_all_party_mention_2 (cost=0.44..27,890.18 rows=14,017 width=8) (actual time=3.231..1,576.949 rows=25,797 loops=1)

  • Index Cond: (case_id = 2000126356)
9. 0.818 0.818 ↓ 0.0 0 1

Parallel Index Scan using ix_pacer_curation_party_mention_case_id on pacer_curation_party_mention pacer_all_party_mention_1 (cost=0.29..26.08 rows=4 width=8) (actual time=0.818..0.818 rows=0 loops=1)

  • Index Cond: (case_id = 2000126356)
10. 0.001 0.001 ↓ 0.0 0 1

Parallel Seq Scan on pacer_all_party_mention (cost=0.00..0.00 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (case_id = 2000126356)
11. 128.985 20,070.066 ↑ 2.0 1 25,797

Append (cost=0.00..8.02 rows=2 width=52) (actual time=0.777..0.778 rows=1 loops=25,797)

12. 0.000 0.000 ↓ 0.0 0 25,797

Seq Scan on normalized_party_mention (cost=0.00..0.00 rows=1 width=80) (actual time=0.000..0.000 rows=0 loops=25,797)

  • Filter: ((NOT filter_out) AND (pacer_all_party_mention_2.id = id))
13. 19,941.081 19,941.081 ↑ 1.0 1 25,797

Index Scan using normalized_party_mention_20200515135149_pkey on normalized_party_mention_20200515135149 normalized_party_mention_1 (cost=0.56..8.01 rows=1 width=52) (actual time=0.773..0.773 rows=1 loops=25,797)

  • Index Cond: (id = pacer_all_party_mention_2.id)
  • Filter: (NOT filter_out)
  • Rows Removed by Filter: 0
14. 7,756.560 7,756.560 ↑ 1.0 1 23,940

Index Scan using unnormalized_party_mention_pkey on unnormalized_party_mention (cost=0.56..0.71 rows=1 width=34) (actual time=0.324..0.324 rows=1 loops=23,940)

  • Index Cond: (id = normalized_party_mention.id)
  • Filter: (NOT filter_out)
15. 167.580 77,182.560 ↓ 1.5 3 23,940

Append (cost=0.00..10.94 rows=2 width=20) (actual time=0.995..3.224 rows=3 loops=23,940)

16. 0.000 0.000 ↓ 0.0 0 23,940

Seq Scan on attorney_representation_cache (cost=0.00..0.00 rows=1 width=20) (actual time=0.000..0.000 rows=0 loops=23,940)

  • Filter: ((case_id = 2000126356) AND ((normalized_party_mention.cluster_id)::integer = litigating_entity_id))
17. 77,014.980 77,014.980 ↓ 3.0 3 23,940

Index Scan using attorney_representation_cache_20200515_litigating_entity_id_idx on attorney_representation_cache_20200515041529 attorney_representation_cache_1 (cost=0.56..10.93 rows=1 width=20) (actual time=0.990..3.217 rows=3 loops=23,940)

  • Index Cond: ((normalized_party_mention.cluster_id)::integer = litigating_entity_id)
  • Filter: (case_id = 2000126356)
  • Rows Removed by Filter: 41
18. 162.556 1,788.116 ↑ 2.0 1 81,278

Append (cost=0.00..1.26 rows=2 width=27) (actual time=0.022..0.022 rows=1 loops=81,278)

19. 0.000 0.000 ↓ 0.0 0 81,278

Seq Scan on attorney_cache (cost=0.00..0.00 rows=1 width=40) (actual time=0.000..0.000 rows=0 loops=81,278)

  • Filter: (id = attorney_representation_cache.attorney_cluster_id)
20. 1,625.560 1,625.560 ↑ 1.0 1 81,278

Index Scan using attorney_cache_20200515041529_pkey on attorney_cache_20200515041529 attorney_cache_1 (cost=0.42..1.25 rows=1 width=27) (actual time=0.019..0.020 rows=1 loops=81,278)

  • Index Cond: (id = attorney_representation_cache.attorney_cluster_id)
21. 105.790 391.507 ↓ 2.4 248,525 1

Parallel Hash (cost=6,458.29..6,458.29 rows=103,553 width=31) (actual time=391.507..391.507 rows=248,525 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 18400kB
22. 21.524 285.717 ↓ 2.4 248,525 1

Parallel Append (cost=0.00..6,458.29 rows=103,553 width=31) (actual time=0.013..285.717 rows=248,525 loops=1)

23. 264.192 264.192 ↓ 2.4 248,525 1

Parallel Seq Scan on law_firm_cache_20200515041529 law_firm_cache_1 (cost=0.00..5,940.52 rows=103,552 width=31) (actual time=0.011..264.192 rows=248,525 loops=1)

24. 0.001 0.001 ↓ 0.0 0 1

Parallel Seq Scan on law_firm_cache (cost=0.00..0.00 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=1)

Planning time : 1.784 ms
Execution time : 109,369.390 ms