explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FDLi

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 1,223.574 ↓ 1.2 1,255 1

Finalize GroupAggregate (cost=435,800.42..436,059.09 rows=1,021 width=24) (actual time=1,222.013..1,223.574 rows=1,255 loops=1)

  • Group Key: tsa."ServiceAreaID
2. 53.416 1,234.672 ↓ 1.8 3,577 1

Gather Merge (cost=435,800.42..436,038.67 rows=2,042 width=24) (actual time=1,222.008..1,234.672 rows=3,577 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.552 1,181.256 ↓ 1.2 1,192 3 / 3

Sort (cost=434,800.39..434,802.94 rows=1,021 width=24) (actual time=1,181.179..1,181.256 rows=1,192 loops=3)

  • Sort Key: tsa."ServiceAreaID
  • Sort Method: quicksort Memory: 142kB
  • Worker 0: Sort Method: quicksort Memory: 142kB
  • Worker 1: Sort Method: quicksort Memory: 141kB
4. 71.383 1,180.704 ↓ 1.2 1,192 3 / 3

Partial HashAggregate (cost=434,739.15..434,749.36 rows=1,021 width=24) (actual time=1,180.430..1,180.704 rows=1,192 loops=3)

  • Group Key: tsa."ServiceAreaID
5. 64.652 1,109.321 ↓ 1.5 262,211 3 / 3

Nested Loop (cost=2,745.26..433,841.17 rows=179,597 width=16) (actual time=5.414..1,109.321 rows=262,211 loops=3)

6. 15.574 83.445 ↓ 1.5 40,051 3 / 3

Hash Join (cost=2,744.70..155,050.98 rows=26,504 width=16) (actual time=5.151..83.445 rows=40,051 loops=3)

  • Hash Cond: (t."TicketTypeID" = tt."ID")
7. 63.343 67.735 ↑ 1.3 40,424 3 / 3

Parallel Bitmap Heap Scan on "Tickets" t (cost=2,743.63..154,763.34 rows=53,008 width=32) (actual time=4.983..67.735 rows=40,424 loops=3)

  • Recheck Cond: (("ResponseDueDate" >= '2020-01-01 00:00:00-05'::timestamp with time zone) AND ("ResponseDueDate" < '2020-02-01 00:00:00-05'::timestamp with time zone))
  • Filter: ((NOT "IsCanceled") AND (("ChildTicketNumber" IS NULL) OR (("TicketNumber")::text <> ("ChildTicketNumber")::text)) AND ("Status" = 2))
  • Rows Removed by Filter: 4488
  • Heap Blocks: exact=3134
8. 4.392 4.392 ↓ 1.0 134,734 1 / 3

Bitmap Index Scan on "IX_Tickets_ResponseDueDate" (cost=0.00..2,711.83 rows=129,140 width=0) (actual time=13.177..13.177 rows=134,734 loops=1)

  • Index Cond: (("ResponseDueDate" >= '2020-01-01 00:00:00-05'::timestamp with time zone) AND ("ResponseDueDate" < '2020-02-01 00:00:00-05'::timestamp with time zone))
9. 0.021 0.136 ↓ 1.5 3 3 / 3

Hash (cost=1.04..1.04 rows=2 width=16) (actual time=0.136..0.136 rows=3 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.115 0.115 ↓ 1.5 3 3 / 3

Seq Scan on "TicketTypes" tt (cost=0.00..1.04 rows=2 width=16) (actual time=0.108..0.115 rows=3 loops=3)

  • Filter: "PositiveResponseRequired
  • Rows Removed by Filter: 1
11. 961.224 961.224 ↑ 7.1 7 120,153 / 3

Index Scan using "IX_TicketServiceAreas_TicketID" on "TicketServiceAreas" tsa (cost=0.56..10.02 rows=50 width=32) (actual time=0.023..0.024 rows=7 loops=120,153)

  • Index Cond: ("TicketID" = t."ID")
Planning time : 0.827 ms
Execution time : 1,235.537 ms