explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aOeJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0 100,000 1

CTE Scan on consensus consensus (cost=0..0 rows=0 width=0) (actual rows=100,000 loops=1)

2.          

CTE tl_with_counts

3. 0.000 0.000 ↓ 0.0 300,000 1

WindowAgg (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

4. 0.000 0.000 ↓ 0.0 300,000 1

Sort (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

  • Sort Key: tl."TransactionId", tl."LabellerId"
  • Sort Method: external merge Disk: 27,632kB
5. 0.000 0.000 ↓ 0.0 300,000 1

WindowAgg (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

6. 0.000 0.000 ↓ 0.0 300,000 1

Sort (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

  • Sort Key: tl."TransactionId", tl."Label"
  • Sort Method: external merge Disk: 25,312kB
7. 0.000 0.000 ↓ 0.0 300,000 1

WindowAgg (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

8. 0.000 0.000 ↓ 0.0 300,000 1

Sort (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

  • Sort Key: tl."TransactionId"
  • Sort Method: external merge Disk: 21,552kB
9. 0.000 0.000 ↓ 0.0 300,000 1

Hash Join (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

10. 0.000 0.000 ↓ 0.0 300,000 1

Seq Scan on TransactionLabels tl (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

  • Filter: ("ClassifierId" = 'decision_network'::text)
11. 0.000 0.000 ↓ 0.0 10 1

Hash (cost=0..0 rows=0 width=0) (actual rows=10 loops=1)

12. 0.000 0.000 ↓ 0.0 10 1

Seq Scan on LabelSets label_sets (cost=0..0 rows=0 width=0) (actual rows=10 loops=1)

  • Filter: "Completed"
13.          

CTE tl_with_consensus

14. 0.000 0.000 ↓ 0.0 300,000 1

CTE Scan on tl_with_counts tl_1 (cost=0..0 rows=0 width=0) (actual rows=300,000 loops=1)

  • Filter: ("TimesTransactionLabelledByLabeller" = 1)
15.          

CTE tl_consensus_filtered

16. 0.000 0.000 ↓ 0.0 225,016 1

CTE Scan on tl_with_consensus tl_with_consensus (cost=0..0 rows=0 width=0) (actual rows=225,016 loops=1)

  • Filter: ("Consensus" > 0.5)
17.          

CTE consensus

18. 0.000 0.000 ↓ 0.0 100,000 1

Sort (cost=0..0 rows=0 width=0) (actual rows=100,000 loops=1)

  • Sort Key: tl_2."TransactionId"
  • Sort Method: external merge Disk: 5,688kB
19. 0.000 0.000 ↓ 0.0 100,000 1

HashAggregate (cost=0..0 rows=0 width=0) (actual rows=100,000 loops=1)

  • Group Key: tl_2."TransactionId", tl_2."CaseId", tl_2."Label", tl_2."ClassifierId", tl_2."Consensus"
20. 0.000 0.000 ↓ 0.0 225,016 1

CTE Scan on tl_consensus_filtered tl_2 (cost=0..0 rows=0 width=0) (actual rows=225,016 loops=1)

21.          

CTE tl_for_other_classifiers

22. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=0..0 rows=0 width=0) (never executed)

  • Sort Key: tl_3."Id"
23. 0.000 0.000 ↓ 0.0 0 0

WindowAgg (cost=0..0 rows=0 width=0) (never executed)

24. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=0..0 rows=0 width=0) (never executed)

  • Sort Key: tl_3."TransactionId", tl_3."Label", tl_3."ClassifierId", tl_3."LabellerId"
25. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=0..0 rows=0 width=0) (never executed)

26. 0.000 0.000 ↓ 0.0 0 0

CTE Scan on tl_consensus_filtered tl_consensus_filtered (cost=0..0 rows=0 width=0) (never executed)

27. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=0..0 rows=0 width=0) (never executed)

28. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on TransactionLabels tl_3 (cost=0..0 rows=0 width=0) (never executed)

  • Filter: ("ClassifierId" <> 'decision_network'::text)
29.          

CTE tl_for_other_classifiers_unique_aggregated

30. 0.000 0.000 ↓ 0.0 0 0

GroupAggregate (cost=0..0 rows=0 width=0) (never executed)

  • Group Key: tl_4."TransactionId"
31. 0.000 0.000 ↓ 0.0 0 0

Sort (cost=0..0 rows=0 width=0) (never executed)

  • Sort Key: tl_4."TransactionId"
32. 0.000 0.000 ↓ 0.0 0 0

CTE Scan on tl_for_other_classifiers tl_4 (cost=0..0 rows=0 width=0) (never executed)

  • Filter: (NOT "IsDuplicateRow")