explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SI5Y

Settings
# exclusive inclusive rows x rows loops node
1. 2.969 2,064.916 ↓ 565.6 4,525 1

GroupAggregate (cost=97,024.10..97,024.30 rows=8 width=44) (actual time=2,060.661..2,064.916 rows=4,525 loops=1)

  • Group Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest".endpoint, "TurnoversRest"."nomenclatureCode
2. 18.126 2,061.947 ↓ 833.8 6,670 1

Sort (cost=97,024.10..97,024.12 rows=8 width=44) (actual time=2,060.647..2,061.947 rows=6,670 loops=1)

  • Sort Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest"."nomenclatureCode
  • Sort Method: quicksort Memory: 1130kB
3. 503.274 2,043.821 ↓ 833.8 6,670 1

Merge Join (cost=90,872.02..97,023.98 rows=8 width=44) (actual time=1,215.297..2,043.821 rows=6,670 loops=1)

  • Merge Cond: (("TurnoversRest"."nomenclatureCode")::text = ("Turnovers"."nomenclatureCode")::text)
  • Join Filter: ("Turnovers".import = "TurnoversRest".import)
  • Rows Removed by Join Filter: 2186154
4. 52.970 52.970 ↓ 1.1 41,108 1

Index Scan using "TurnoversRest_endpoint_nomenclatureCode_idx" on "TurnoversRest" (cost=0.57..4,619.73 rows=36,389 width=56) (actual time=0.025..52.970 rows=41,108 loops=1)

  • Index Cond: (endpoint = '111ccc0a-d90a-4f8a-a02a-971946fe657f'::uuid)
5. 802.807 1,487.577 ↓ 17.5 2,198,706 1

Sort (cost=90,868.42..91,182.60 rows=125,671 width=43) (actual time=1,214.977..1,487.577 rows=2,198,706 loops=1)

  • Sort Key: "Turnovers"."nomenclatureCode
  • Sort Method: quicksort Memory: 22667kB
6. 684.770 684.770 ↓ 1.2 145,284 1

Index Scan using "Turnovers_endpoint_docDate_idx" on "Turnovers" (cost=0.57..80,224.53 rows=125,671 width=43) (actual time=0.757..684.770 rows=145,284 loops=1)

  • Index Cond: (endpoint = '111ccc0a-d90a-4f8a-a02a-971946fe657f'::uuid)
  • Filter: ("docType" = 3)
  • Rows Removed by Filter: 798890