explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KUau

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.013 2,576.245 ↓ 0.0 0 1

HashAggregate (cost=114,586.61..114,587.16 rows=37 width=55) (actual time=2,576.245..2,576.245 rows=0 loops=1)

  • Group Key: "CaseReview6"."reviewSeqNo", "CaseReview6".xmin, "CaseReview6"."caseNo", "CaseReview6"."countyNo", (("CaseReview6".ctid)::character varying)
2. 502.177 2,576.232 ↓ 0.0 0 1

Gather (cost=109,411.74..114,586.15 rows=37 width=55) (actual time=2,576.232..2,576.232 rows=0 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 0.003 2,074.055 ↓ 0.0 0 2

Nested Loop (cost=108,411.74..113,582.37 rows=22 width=55) (actual time=2,074.055..2,074.055 rows=0 loops=2)

  • Join Filter: (("Review7"."countyNo")::smallint = ("Case8"."countyNo")::smallint)
4. 0.077 2,074.052 ↓ 0.0 0 2

Hash Join (cost=108,411.18..113,520.53 rows=19 width=31) (actual time=2,074.052..2,074.052 rows=0 loops=2)

  • Hash Cond: ((("CaseReview6"."countyNo")::smallint = ("Review7"."countyNo")::smallint) AND (("CaseReview6"."reviewSeqNo")::integer = ("Review7"."seqNo")::integer))
5. 0.014 0.014 ↑ 153,163.0 1 2

Parallel Seq Scan on "CaseReview" "CaseReview6" (cost=0.00..3,194.63 rows=153,163 width=29) (actual time=0.014..0.014 rows=1 loops=2)

6. 0.001 2,073.961 ↓ 0.0 0 2

Hash (cost=108,408.85..108,408.85 rows=155 width=6) (actual time=2,073.961..2,073.961 rows=0 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 1,063.526 2,073.960 ↓ 0.0 0 2

Hash Right Join (cost=46,873.18..108,408.85 rows=155 width=6) (actual time=2,073.960..2,073.960 rows=0 loops=2)

  • Hash Cond: ((("ReviewMessage9"."countyNo")::smallint = ("Review7"."countyNo")::smallint) AND (("ReviewMessage9"."reviewSeqNo")::integer = ("Review7"."seqNo")::integer))
  • Filter: (((("Review7".sender)::text = 'FBOYLE'::text) OR (("ReviewMessage9".sender)::text = 'FBOYLE'::text)) AND (((("Review7"."sentWhen")::timestamp without time zone >= '2018-11-26 00:00:00'::timestamp without time zone) AND (("Review7"."sentWhen")::timestamp without time zone <= '2018-12-26 23:59:59.999'::timestamp without time zone)) OR ((("ReviewMessage9"."sentWhen")::timestamp without time zone >= '2018-11-26 00:00:00'::timestamp without time zone) AND (("ReviewMessage9"."sentWhen")::timestamp without time zone <= '2018-12-26 23:59:59.999'::timestamp without time zone))))
  • Rows Removed by Filter: 1536348
8. 298.284 298.284 ↑ 1.0 1,102,391 2

Seq Scan on "ReviewMessage" "ReviewMessage9" (cost=0.00..28,176.00 rows=1,102,800 width=21) (actual time=0.044..298.284 rows=1,102,391 loops=2)

9. 404.223 712.150 ↓ 1.0 1,359,501 2

Hash (cost=26,485.67..26,485.67 rows=1,359,167 width=21) (actual time=712.150..712.150 rows=1,359,501 loops=2)

  • Buckets: 2097152 Batches: 1 Memory Usage: 91596kB
10. 307.927 307.927 ↓ 1.0 1,359,501 2

Seq Scan on "Review" "Review7" (cost=0.00..26,485.67 rows=1,359,167 width=21) (actual time=0.024..307.927 rows=1,359,501 loops=2)

11. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "Case_caseNo" on "Case" "Case8" (cost=0.56..3.24 rows=1 width=15) (never executed)

  • Index Cond: (("caseNo" = ("CaseReview6"."caseNo")::text) AND ("countyNo" = ("CaseReview6"."countyNo")::smallint))
  • Heap Fetches: 0