explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 12Dy

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

Unique (cost=369,438.44..369,812.59 rows=16,629 width=96) (never executed)

2. 0.000 0.000 ↓ 0.0

Sort (cost=369,438.44..369,480.01 rows=16,629 width=96) (never executed)

  • Sort Key: transaction_labels."TransactionId", transaction_labels."CaseId", transaction_labels."LabelSetId", transaction_labels."LabellerId", "TransactionLabels"."ClassifierId", "TransactionLabels"."Label", "TransactionLabels"."Id", ((consensus_base.consensus_count / ((count("TransactionLabels_1"."Label")))::numeric))
3. 0.000 0.000 ↓ 0.0

Merge Join (cost=329,633.53..368,272.63 rows=16,629 width=96) (never executed)

4. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=48,754.42..84,307.3 rows=150,719 width=39) (never executed)

  • Group Key: "TransactionLabels_1"."TransactionId", "TransactionLabels_1"."ClassifierId", "TransactionLabels_1"."LabelSetId"
5. 0.000 0.000 ↓ 0.0

Gather Merge (cost=48,754.42..80,309.11 rows=249,100 width=39) (never executed)

  • Workers Planned: 2
6. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=47,754.39..50,556.77 rows=124,550 width=39) (never executed)

  • Group Key: "TransactionLabels_1"."TransactionId", "TransactionLabels_1"."ClassifierId", "TransactionLabels_1"."LabelSetId"
7. 0.000 0.000 ↓ 0.0

Sort (cost=47,754.39..48,065.77 rows=124,550 width=44) (never executed)

  • Sort Key: "TransactionLabels_1"."TransactionId", "TransactionLabels_1"."LabelSetId"
8. 0.000 0.000 ↓ 0.0

Seq Scan on TransactionLabels TransactionLabels_1 (cost=0..33,381 rows=124,550 width=44) (never executed)

  • Filter: ("TransactionLabels_1"."ClassifierId" = 'Decision'::text)
9. 0.000 0.000 ↓ 0.0

Sort (cost=280,879.11..280,879.28 rows=66 width=104) (never executed)

  • Sort Key: transaction_labels."TransactionId"
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=210,071.37..280,877.12 rows=66 width=104) (never executed)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=210,026.72..280,831.56 rows=66 width=116) (never executed)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=117,184.72..168,640.72 rows=109 width=68) (never executed)

13. 0.000 0.000 ↓ 0.0

Seq Scan on TransactionLabels transaction_labels (cost=0..42,006 rows=1,800,000 width=45) (never executed)

14. 0.000 0.000 ↓ 0.0

Hash (cost=117,166.72..117,166.72 rows=1,200 width=49) (never executed)

15. 0.000 0.000 ↓ 0.0

Subquery Scan on consensus_base (cost=116,980.21..117,166.72 rows=1,200 width=49) (never executed)

16. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=116,980.21..117,154.72 rows=1,200 width=49) (never executed)

  • Group Key: selected_transaction_labels."TransactionId", "TransactionLabels_2"."Label"
17. 0.000 0.000 ↓ 0.0

Gather Merge (cost=116,980.21..117,130.72 rows=1,200 width=25) (never executed)

  • Workers Planned: 2
18. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=115,980.19..115,992.19 rows=600 width=25) (never executed)

  • Group Key: selected_transaction_labels."TransactionId", "TransactionLabels_2"."Label"
19. 0.000 0.000 ↓ 0.0

Sort (cost=115,980.19..115,981.69 rows=600 width=17) (never executed)

  • Sort Key: selected_transaction_labels."TransactionId", "TransactionLabels_2"."Label"
20. 0.000 0.000 ↓ 0.0

Hash Join (cost=82,244.55..115,952.5 rows=600 width=17) (never executed)

21. 0.000 0.000 ↓ 0.0

Seq Scan on TransactionLabels TransactionLabels_2 (cost=0..33,381 rows=124,550 width=17) (never executed)

  • Filter: ("TransactionLabels_2"."ClassifierId" = 'Decision'::text)
22. 0.000 0.000 ↓ 0.0

Hash (cost=82,238.6..82,238.6 rows=476 width=4) (never executed)

23. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=78,801.88..82,233.84 rows=476 width=4) (never executed)

  • Group Key: selected_transaction_labels."TransactionId"
  • Filter: (count(DISTINCT selected_transaction_labels."LabelSetId") = 1)
24. 0.000 0.000 ↓ 0.0

Sort (cost=78,801.88..79,549.18 rows=298,920 width=16) (never executed)

  • Sort Key: selected_transaction_labels."TransactionId"
25. 0.000 0.000 ↓ 0.0

Seq Scan on TransactionLabels selected_transaction_labels (cost=0..46,506 rows=298,920 width=16) (never executed)

  • Filter: (selected_transaction_labels."ClassifierId" = 'Decision'::text)
26. 0.000 0.000 ↓ 0.0

Hash (cost=42,006..42,006 rows=1,800,000 width=60) (never executed)

27. 0.000 0.000 ↓ 0.0

Seq Scan on TransactionLabels TransactionLabels (cost=0..42,006 rows=1,800,000 width=60) (never executed)

28. 0.000 0.000 ↓ 0.0

Hash (cost=25.4..25.4 rows=1,540 width=12) (never executed)

29. 0.000 0.000 ↓ 0.0

Seq Scan on LabelSets labelsets (cost=0..25.4 rows=1,540 width=12) (never executed)

  • Filter: labelsets."Completed"
Planning time : 1.372 ms