explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tnxc

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

Sort (cost=26,926.44..26,951.72 rows=10,111 width=4,226) (actual rows= loops=)

  • Sort Key: e0."IsTop" DESC, e0."HasContract" DESC, ((SubPlan 1)), e0."Id", e3."Id", d."Id", l."Id", d1."Id", l0."Id", l1."Id", d2."Id", e4."Id", e5."Id", d3."Id", e6."Id", p."Id", p0."Id", s."Id", s0."Id", s1."Id
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,656.52..7,868.38 rows=10,111 width=4,226) (actual rows= loops=)

  • Hash Cond: (e0."Id" = e6."EmployeeId")
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=890.90..2,665.40 rows=2,205 width=4,038) (actual rows= loops=)

  • Hash Cond: (e0."Id" = s1."EmployeeId")
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=821.83..2,560.87 rows=2,147 width=4,018) (actual rows= loops=)

  • Hash Cond: (e0."Id" = s0."EmployeeId")
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=752.77..2,457.26 rows=2,091 width=3,998) (actual rows= loops=)

  • Hash Cond: (e0."Id" = s."EmployeeId")
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=740.24..2,413.40 rows=2,085 width=3,978) (actual rows= loops=)

  • Hash Cond: (e0."Id" = e5."EmployeeId")
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=222.68..1,836.10 rows=1,296 width=3,914) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=216.13..381.10 rows=21 width=1,080) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=211.82..269.73 rows=7 width=83) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Limit (cost=211.54..211.56 rows=7 width=83) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Sort (cost=211.54..211.56 rows=7 width=83) (actual rows= loops=)

  • Sort Key: e0."IsTop" DESC, e0."HasContract" DESC, ((SubPlan 1))
12. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=31.06..211.44 rows=7 width=83) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=30.77..96.99 rows=8 width=67) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

HashAggregate (cost=30.49..30.57 rows=8 width=16) (actual rows= loops=)

  • Group Key: e2."EmployeeId
15. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on "EmployeeDivisionsPositions" e2 (cost=4.35..30.47 rows=8 width=16) (actual rows= loops=)

  • Recheck Cond: ("DivisionId" = 'f2b952af-1a26-4d37-ac3d-65634902b2ce'::uuid)
16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "IX_EmployeeDivisionsPositions_DivisionId" (cost=0.00..4.34 rows=8 width=0) (actual rows= loops=)

  • Index Cond: ("DivisionId" = 'f2b952af-1a26-4d37-ac3d-65634902b2ce'::uuid)
17. 0.000 0.000 ↓ 0.0

Index Scan using "PK_Employees" on "Employees" e0 (cost=0.28..8.30 rows=1 width=51) (actual rows= loops=)

  • Index Cond: ("Id" = e2."EmployeeId")
18. 0.000 0.000 ↓ 0.0

Index Only Scan using "AK_EmployeeDivisionsPositions_EmployeeId_DivisionId_PositionId" on "EmployeeDivisionsPositions" e1 (cost=0.29..0.43 rows=2 width=16) (actual rows= loops=)

  • Index Cond: ("EmployeeId" = e0."Id")
19.          

SubPlan (for Nested Loop Semi Join)

20. 0.000 0.000 ↓ 0.0

Limit (cost=4.31..15.89 rows=1 width=13) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on "EmployeeTranslations" e (cost=4.31..15.89 rows=1 width=13) (actual rows= loops=)

  • Recheck Cond: (e0."Id" = "EntityId")
  • Filter: ("CultureName" = 'ru'::text)
22. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "IX_EmployeeTranslations_EntityId" (cost=0.00..4.31 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (e0."Id" = "EntityId")
23. 0.000 0.000 ↓ 0.0

Index Only Scan using "PK_Files" on "Files" f (cost=0.28..8.30 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ("Id" = e0."AvatarId")
24. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on "EmployeeTranslations" e4 (cost=4.31..15.88 rows=3 width=997) (actual rows= loops=)

  • Recheck Cond: (e0."Id" = "EntityId")
25. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "IX_EmployeeTranslations_EntityId" (cost=0.00..4.31 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (e0."Id" = "EntityId")
26. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=6.55..68.48 rows=81 width=2,850) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=6.27..38.24 rows=27 width=2,276) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.99..22.91 rows=9 width=1,378) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.84..20.87 rows=6 width=1,301) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.56..17.46 rows=2 width=403) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.28..15.39 rows=2 width=402) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5.00..13.25 rows=2 width=401) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.72..12.56 rows=2 width=340) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.58..12.22 rows=2 width=307) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on "EmployeeDivisionsPositions" e3 (cost=4.30..11.58 rows=2 width=48) (actual rows= loops=)

  • Recheck Cond: (e0."Id" = "EmployeeId")
36. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "AK_EmployeeDivisionsPositions_EmployeeId_DivisionId_PositionId" (cost=0.00..4.30 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (e0."Id" = "EmployeeId")
37. 0.000 0.000 ↓ 0.0

Index Scan using "PK_Divisions" on "Divisions" d (cost=0.28..0.32 rows=1 width=275) (actual rows= loops=)

  • Index Cond: ("Id" = e3."DivisionId")
38. 0.000 0.000 ↓ 0.0

Index Scan using "PK_DivisionTypes" on "DivisionTypes" d0 (cost=0.14..0.17 rows=1 width=48) (actual rows= loops=)

  • Index Cond: (d."DivisionTypeId" = "Id")
39. 0.000 0.000 ↓ 0.0

Index Scan using "PK_LegalEntities" on "LegalEntities" l (cost=0.28..0.35 rows=1 width=77) (actual rows= loops=)

  • Index Cond: ("Id" = d."LegalEntityId")
40. 0.000 0.000 ↓ 0.0

Index Only Scan using "PK_Files" on "Files" f0 (cost=0.28..1.07 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ("Id" = l."LogoId")
41. 0.000 0.000 ↓ 0.0

Index Only Scan using "PK_Files" on "Files" f1 (cost=0.28..0.78 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ("Id" = d."LogoId")
42. 0.000 0.000 ↓ 0.0

Index Scan using "IX_LegalEntityTranslations_EntityId" on "LegalEntityTranslations" l0 (cost=0.28..1.67 rows=3 width=898) (actual rows= loops=)

  • Index Cond: (l."Id" = "EntityId")
43. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DivisionTypeTranslations_EntityId" on "DivisionTypeTranslations" d1 (cost=0.14..0.33 rows=1 width=77) (actual rows= loops=)

  • Index Cond: (d0."Id" = "EntityId")
44. 0.000 0.000 ↓ 0.0

Index Scan using "IX_LegalEntityTranslations_EntityId" on "LegalEntityTranslations" l1 (cost=0.28..1.67 rows=3 width=898) (actual rows= loops=)

  • Index Cond: (l."Id" = "EntityId")
45. 0.000 0.000 ↓ 0.0

Index Scan using "IX_DivisionTranslations_EntityId" on "DivisionTranslations" d2 (cost=0.28..1.09 rows=3 width=573) (actual rows= loops=)

  • Index Cond: (d."Id" = "EntityId")
46. 0.000 0.000 ↓ 0.0

Hash (cost=376.51..376.51 rows=11,284 width=80) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Hash Join (cost=104.97..376.51 rows=11,284 width=80) (actual rows= loops=)

  • Hash Cond: (e5."DivisionId" = d3."Id")
48. 0.000 0.000 ↓ 0.0

Seq Scan on "EmployeeDivisionsPositions" e5 (cost=0.00..241.84 rows=11,284 width=48) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Hash (cost=84.43..84.43 rows=1,643 width=48) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Seq Scan on "Divisions" d3 (cost=0.00..84.43 rows=1,643 width=48) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Hash (cost=7.79..7.79 rows=379 width=36) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Seq Scan on "ScienceDegrees" s (cost=0.00..7.79 rows=379 width=36) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Hash (cost=45.14..45.14 rows=1,914 width=36) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Seq Scan on "Specialities" s0 (cost=0.00..45.14 rows=1,914 width=36) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Hash (cost=45.14..45.14 rows=1,914 width=36) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Seq Scan on "Specialities" s1 (cost=0.00..45.14 rows=1,914 width=36) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Hash (cost=672.66..672.66 rows=32,157 width=146) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash Join (cost=38.72..672.66 rows=32,157 width=146) (actual rows= loops=)

  • Hash Cond: (e6."PositionId" = p."Id")
59. 0.000 0.000 ↓ 0.0

Seq Scan on "EmployeeDivisionsPositions" e6 (cost=0.00..241.84 rows=11,284 width=48) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Hash (cost=29.00..29.00 rows=778 width=114) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=9.14..29.00 rows=778 width=114) (actual rows= loops=)

  • Hash Cond: (p0."EntityId" = p."Id")
62. 0.000 0.000 ↓ 0.0

Seq Scan on "PositionTranslations" p0 (cost=0.00..17.78 rows=778 width=66) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Hash (cost=5.73..5.73 rows=273 width=48) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Seq Scan on "Positions" p (cost=0.00..5.73 rows=273 width=48) (actual rows= loops=)