explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 33tQ

Settings
# exclusive inclusive rows x rows loops node
1. 13.366 48,915.116 ↓ 187.9 22,176 1

GroupAggregate (cost=948,804.71..948,807.66 rows=118 width=44) (actual time=48,897.839..48,915.116 rows=22,176 loops=1)

  • Group Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest".endpoint, "TurnoversRest"."nomenclatureCode
2. 58.868 48,901.750 ↓ 259.7 30,643 1

Sort (cost=948,804.71..948,805.00 rows=118 width=44) (actual time=48,897.826..48,901.750 rows=30,643 loops=1)

  • Sort Key: "TurnoversRest".date, "TurnoversRest"."dateSupply", "TurnoversRest".endpoint, "TurnoversRest"."nomenclatureCode
  • Sort Method: quicksort Memory: 5078kB
3. 646.194 48,842.882 ↓ 259.7 30,643 1

Nested Loop (cost=244,248.58..948,800.65 rows=118 width=44) (actual time=34,051.470..48,842.882 rows=30,643 loops=1)

4. 691.741 34,729.136 ↑ 1.2 641,312 1

Bitmap Heap Scan on "Turnovers" (cost=244,248.01..357,620.38 rows=777,599 width=43) (actual time=34,051.419..34,729.136 rows=641,312 loops=1)

  • Recheck Cond: ((endpoint = ANY ('{111ccc0a-d90a-4f8a-a02a-971946fe657f,74393f1f-2a63-470c-973a-926c62c5c978,71e5b2ba-3b88-412b-9e1f-3bb51cd8155d,448d5e2e-4112-4b02-baf8-d0a16bd7005e,71107e22-77a9-4e11-be60-03bb8ccd3527,bb8df09e-bd99-4c41-b249-d3acea4e308b,9c6da908-d9be-4c83-bb79-3a1d5a5524b2,f77eba9e-d4bd-41f3-b8ed-dd74c87ad1c7,1963eccb-1322-4226-9b96-6f08f3db8aea,ede3c2ae-a6d2-4c15-afb9-14c9233e2808,700eef56-2cb3-411e-9eee-8aef3d2816f4,c566f084-ffda-4fb1-b11d-d2eeb8bfbce1,0ab0ec2d-384c-4242-9216-452e8eb96b4b,31ff3a99-0707-41ea-bee5-68daaf2cdeee,214fc514-4310-4acd-8c06-16e706c0e94a,404e9e4f-08c6-4f04-a583-3896a2534411,1606ae60-e974-4702-8b06-3e584512105e,e9325fd5-f353-49ad-a811-a543df294ea0,0575fcf9-2ce4-4264-99a5-6332b61e62f5,f6414a03-6bd7-4337-89eb-aa7835d54638,a09bfaa0-c6d8-4c1e-a5ed-c522d1ca2a36,2261b5e2-9566-42eb-b42a-be637f7985fe,45528d5b-88c1-4465-ad95-cfe48a7ea29c,bb93a796-fa12-4c5f-b0c0-420b7ef4e170,5729da9e-a3d6-48b8-bdb6-5dc1154ffdd0,730926ea-f609-4212-8a0a-43117f86dede,7a1b8349-d342-4d46-bd4b-1792c81226d5,d21ecf74-8b88-47cd-a952-4587417fc127}'::uuid[])) AND ("docType" = 3))
  • Rows Removed by Index Recheck: 368092
  • Heap Blocks: exact=38040
5. 62.679 34,037.395 ↓ 0.0 0 1

BitmapAnd (cost=244,248.01..244,248.01 rows=777,599 width=0) (actual time=34,037.395..34,037.395 rows=0 loops=1)

6. 2,343.819 2,343.819 ↑ 1.0 3,900,286 1

Bitmap Index Scan on "Turnovers_endpoint_docDate_idx" (cost=0.00..34,430.16 rows=3,993,829 width=0) (actual time=2,343.819..2,343.819 rows=3,900,286 loops=1)

  • Index Cond: (endpoint = ANY ('{111ccc0a-d90a-4f8a-a02a-971946fe657f,74393f1f-2a63-470c-973a-926c62c5c978,71e5b2ba-3b88-412b-9e1f-3bb51cd8155d,448d5e2e-4112-4b02-baf8-d0a16bd7005e,71107e22-77a9-4e11-be60-03bb8ccd3527,bb8df09e-bd99-4c41-b249-d3acea4e308b,9c6da908-d9be-4c83-bb79-3a1d5a5524b2,f77eba9e-d4bd-41f3-b8ed-dd74c87ad1c7,1963eccb-1322-4226-9b96-6f08f3db8aea,ede3c2ae-a6d2-4c15-afb9-14c9233e2808,700eef56-2cb3-411e-9eee-8aef3d2816f4,c566f084-ffda-4fb1-b11d-d2eeb8bfbce1,0ab0ec2d-384c-4242-9216-452e8eb96b4b,31ff3a99-0707-41ea-bee5-68daaf2cdeee,214fc514-4310-4acd-8c06-16e706c0e94a,404e9e4f-08c6-4f04-a583-3896a2534411,1606ae60-e974-4702-8b06-3e584512105e,e9325fd5-f353-49ad-a811-a543df294ea0,0575fcf9-2ce4-4264-99a5-6332b61e62f5,f6414a03-6bd7-4337-89eb-aa7835d54638,a09bfaa0-c6d8-4c1e-a5ed-c522d1ca2a36,2261b5e2-9566-42eb-b42a-be637f7985fe,45528d5b-88c1-4465-ad95-cfe48a7ea29c,bb93a796-fa12-4c5f-b0c0-420b7ef4e170,5729da9e-a3d6-48b8-bdb6-5dc1154ffdd0,730926ea-f609-4212-8a0a-43117f86dede,7a1b8349-d342-4d46-bd4b-1792c81226d5,d21ecf74-8b88-47cd-a952-4587417fc127}'::uuid[]))
7. 31,630.897 31,630.897 ↓ 1.4 36,534,512 1

Bitmap Index Scan on "Turnovers_docType_idx" (cost=0.00..209,428.80 rows=25,822,779 width=0) (actual time=31,630.897..31,630.897 rows=36,534,512 loops=1)

  • Index Cond: ("docType" = 3)
8. 13,467.552 13,467.552 ↓ 0.0 0 641,312

Index Scan using "TurnoversRest_endpoint_nomenclatureCode_idx" on "TurnoversRest" (cost=0.57..0.75 rows=1 width=56) (actual time=0.021..0.021 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