explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oL9u

Settings
# exclusive inclusive rows x rows loops node
1. 13.497 141,740.021 ↓ 113.7 22,176 1

GroupAggregate (cost=1,100,701.08..1,100,705.96 rows=195 width=44) (actual time=141,720.686..141,740.021 rows=22,176 loops=1)

  • Group Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest".endpoint, "TurnoversRest"."nomenclatureCode
2. 70.115 141,726.524 ↓ 157.1 30,643 1

Sort (cost=1,100,701.08..1,100,701.57 rows=195 width=44) (actual time=141,720.673..141,726.524 rows=30,643 loops=1)

  • Sort Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest".endpoint, "TurnoversRest"."nomenclatureCode
  • Sort Method: quicksort Memory: 5078kB
3. 9.698 141,656.409 ↓ 157.1 30,643 1

Gather (cost=1,004.85..1,100,693.67 rows=195 width=44) (actual time=15,863.305..141,656.409 rows=30,643 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
4. 4,447.925 141,646.711 ↓ 125.1 6,129 5

Nested Loop (cost=4.85..1,099,674.17 rows=49 width=44) (actual time=15,849.681..141,646.711 rows=6,129 loops=5)

5. 1,414.482 137,198.752 ↑ 1.8 128,262 5

Hash Semi Join (cost=4.28..920,494.08 rows=227,944 width=59) (actual time=1,776.502..137,198.752 rows=128,262 loops=5)

  • Hash Cond: ("Turnovers".endpoint = "Endpoints".id)
6. 135,783.697 135,783.697 ↓ 1.1 7,270,000 5

Parallel Seq Scan on "Turnovers" (cost=0.00..901,007.73 rows=6,455,695 width=43) (actual time=0.387..135,783.697 rows=7,270,000 loops=5)

  • Filter: ("docType" = 3)
  • Rows Removed by Filter: 30168624
7. 0.021 0.573 ↑ 1.0 28 5

Hash (cost=3.93..3.93 rows=28 width=16) (actual time=0.573..0.573 rows=28 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
8. 0.552 0.552 ↑ 1.0 28 5

Index Scan using "Endpoints_client_idx" on "Endpoints" (cost=0.28..3.93 rows=28 width=16) (actual time=0.071..0.552 rows=28 loops=5)

  • Index Cond: (client = '38ecbc48-663c-4416-8002-710cdb64693f'::uuid)
9. 0.034 0.034 ↓ 0.0 0 641,312

Index Scan using "TurnoversRest_endpoint_nomenclatureCode_idx" on "TurnoversRest" (cost=0.57..0.78 rows=1 width=56) (actual time=0.034..0.034 rows=0 loops=641,312)

  • Index Cond: ((endpoint = "Turnovers".endpoint) AND (("nomenclatureCode")::text = ("Turnovers"."nomenclatureCode")::text))
  • Filter: ("Turnovers".import = import)
  • Rows Removed by Filter: 16