explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xU7b : test

Settings
# exclusive inclusive rows x rows loops node
1. 4.334 1,555.030 ↑ 16,666.5 2 1

Hash Join (cost=33,620.32..35,755.31 rows=33,333 width=32) (actual time=1,554.976..1,555.030 rows=2 loops=1)

  • Hash Cond: (duplicates.id = "TransactionLines"."TaxReturnImportPartTransactionId")
2.          

CTE duplicates

3. 116.139 1,292.463 ↑ 16,666.5 2 1

Subquery Scan on duplicates_1 (cost=21,399.32..26,149.32 rows=33,333 width=16) (actual time=960.365..1,292.463 rows=2 loops=1)

  • Filter: (duplicates_1."rowNumber" > 1)
  • Rows Removed by Filter: 100000
4. 310.115 1,176.324 ↓ 1.0 100,002 1

WindowAgg (cost=21,399.32..24,899.32 rows=100,000 width=105) (actual time=611.075..1,176.324 rows=100,002 loops=1)

5. 705.270 866.209 ↓ 1.0 100,002 1

Sort (cost=21,399.32..21,649.32 rows=100,000 width=97) (actual time=611.067..866.209 rows=100,002 loops=1)

  • Sort Key: "TaxReturnImportPartTransactions"."CompanyId", "TaxReturnImportPartTransactions"."sourceAccount", "TaxReturnImportPartTransactions".transaction, "TaxReturnImportPartTransactions"."taxDate", "TaxReturnImportPartTransactions"."inputOutputIndicator", "TaxReturnImportPartTransactions"."lineNumber", "TaxReturnImportPartTransactions"."createdAt" DESC
  • Sort Method: external merge Disk: 11120kB
6. 160.939 160.939 ↓ 1.0 100,002 1

Seq Scan on "TaxReturnImportPartTransactions" (cost=0.00..7,624.00 rows=100,000 width=97) (actual time=0.011..160.939 rows=100,002 loops=1)

  • Filter: ("TaxReturnImportPartId" = '9fa40410-d2e9-11e9-ae74-5906b0617687'::uuid)
7. 1,292.470 1,292.470 ↑ 16,666.5 2 1

CTE Scan on duplicates (cost=0.00..666.66 rows=33,333 width=16) (actual time=960.368..1,292.470 rows=2 loops=1)

8. 131.485 258.226 ↑ 1.0 100,000 1

Hash (cost=5,537.00..5,537.00 rows=100,000 width=32) (actual time=258.226..258.226 rows=100,000 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 3637kB
9. 126.741 126.741 ↑ 1.0 100,000 1

Seq Scan on "TransactionLines" (cost=0.00..5,537.00 rows=100,000 width=32) (actual time=0.013..126.741 rows=100,000 loops=1)

Planning time : 0.223 ms
Execution time : 1,558.098 ms