explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CdBu

Settings
# exclusive inclusive rows x rows loops node
1. 2.936 2,009.513 ↓ 593.2 4,746 1

GroupAggregate (cost=97,025.45..97,025.65 rows=8 width=44) (actual time=2,005.586..2,009.513 rows=4,746 loops=1)

  • Group Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest".endpoint, "TurnoversRest"."nomenclatureCode
2.          

Initplan (forGroupAggregate)

3. 0.022 0.022 ↑ 17,958.0 1 1

Index Scan using "Nomenclatures_client_index" on "Nomenclatures" (cost=0.56..2,357.32 rows=17,958 width=0) (actual time=0.022..0.022 rows=1 loops=1)

  • Index Cond: (client = '38ecbc48-663c-4416-8002-710cdb64693f'::uuid)
  • Filter: used
4. 12.822 2,006.555 ↓ 861.4 6,891 1

Sort (cost=97,024.76..97,024.78 rows=8 width=44) (actual time=2,005.575..2,006.555 rows=6,891 loops=1)

  • Sort Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest"."nomenclatureCode
  • Sort Method: quicksort Memory: 1162kB
5. 1.243 1,993.733 ↓ 861.4 6,891 1

Result (cost=90,872.68..97,024.64 rows=8 width=44) (actual time=1,223.438..1,993.733 rows=6,891 loops=1)

  • One-Time Filter: $0
6. 476.418 1,992.490 ↓ 861.4 6,891 1

Merge Join (cost=90,872.68..97,024.64 rows=8 width=44) (actual time=1,223.414..1,992.490 rows=6,891 loops=1)

  • Merge Cond: (("TurnoversRest"."nomenclatureCode")::text = ("Turnovers"."nomenclatureCode")::text)
  • Join Filter: ("Turnovers".import = "TurnoversRest".import)
  • Rows Removed by Join Filter: 2238048
7. 47.871 47.871 ↓ 1.2 41,867 1

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

  • Index Cond: (endpoint = '111ccc0a-d90a-4f8a-a02a-971946fe657f'::uuid)
8. 782.523 1,468.201 ↓ 17.9 2,250,821 1

Sort (cost=90,869.08..91,183.26 rows=125,671 width=43) (actual time=1,223.121..1,468.201 rows=2,250,821 loops=1)

  • Sort Key: "Turnovers"."nomenclatureCode
  • Sort Method: quicksort Memory: 22694kB
9. 685.678 685.678 ↓ 1.2 145,505 1

Index Scan using "Turnovers_endpoint_docDate_idx" on "Turnovers" (cost=0.57..80,225.19 rows=125,671 width=43) (actual time=0.682..685.678 rows=145,505 loops=1)

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