Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2022
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 47.19 KB | None | 0 0
  1. QUERY PLAN
  2. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  3. Sort (cost=124598.37..124607.09 rows=3490 width=68)
  4. Sort Key: p_1.date_time
  5. -> Nested Loop Left Join (cost=85708.17..124393.00 rows=3490 width=68)
  6. -> Hash Join (cost=43650.83..50493.30 rows=1452 width=64)
  7. Hash Cond: (s_2.device = o_1.device)
  8. Join Filter: ((m.date_time >= o_1.start_date) AND (m.date_time <= ((SubPlan 2))))
  9. -> Hash Join (cost=1815.14..8127.05 rows=2878 width=80)
  10. Hash Cond: (m.device_info_serial = t_1.device_info_serial)
  11. -> Gather (cost=1559.97..7769.87 rows=604 width=76)
  12. Workers Planned: 2
  13. -> Nested Loop (cost=559.97..6709.47 rows=252 width=76)
  14. -> Hash Join (cost=559.55..5653.91 rows=252 width=64)
  15. Hash Cond: (p_1.device_info_serial = t.device_info_serial)
  16. -> Parallel Seq Scan on "position" p_1 (cost=0.00..5089.26 rows=690 width=32)
  17. Filter: ((date_time >= '2022-10-01 00:00:00'::timestamp without time zone) AND (date_time < '2022-11-01 14:01:00'::timestamp without time zone))
  18. -> Hash (cost=547.63..547.63 rows=953 width=40)
  19. -> Hash Join (cost=457.84..547.63 rows=953 width=40)
  20. Hash Cond: (p_2.id = p.id)
  21. -> Hash Join (cost=452.30..539.50 rows=953 width=48)
  22. Hash Cond: (s.individual = i.id)
  23. -> Hash Join (cost=361.39..446.09 rows=953 width=48)
  24. Hash Cond: (s.device = t.id)
  25. -> Hash Left Join (cost=264.60..346.80 rows=953 width=40)
  26. Hash Cond: (s.individual = o.individual)
  27. -> Hash Join (cost=45.41..120.14 rows=953 width=40)
  28. Hash Cond: (s.project = p_2.id)
  29. -> Seq Scan on ee_track_session s (cost=0.00..68.33 rows=2333 width=32)
  30. -> Hash (cost=44.93..44.93 rows=38 width=8)
  31. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  32. Group Key: p_2.id
  33. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  34. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  35. Hash Cond: (direct_p.id = m_2.project)
  36. -> Seq Scan on ee_project direct_p (cost=0.00..4.13 rows=113 width=24)
  37. -> Hash (cost=35.97..35.97 rows=3 width=8)
  38. -> Unique (cost=35.93..35.94 rows=3 width=8)
  39. -> Sort (cost=35.93..35.94 rows=3 width=8)
  40. Sort Key: m_2.project
  41. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  42. Hash Cond: (m_2.member_user = u.id)
  43. -> Seq Scan on ee_membership m_2 (cost=0.00..19.86 rows=562 width=16)
  44. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  45. -> Hash (cost=14.53..14.53 rows=2 width=8)
  46. -> Seq Scan on ee_user u (cost=0.00..14.53 rows=2 width=8)
  47. Filter: ((login_name)::name = "current_user"())
  48. -> Index Scan using ee_project_rgt_key on ee_project p_2 (cost=0.14..1.08 rows=13 width=24)
  49. Index Cond: (rgt <= direct_p.rgt)
  50. Filter: (lft >= direct_p.lft)
  51. -> Hash (cost=207.57..207.57 rows=930 width=8)
  52. -> Hash Join (cost=136.80..207.57 rows=930 width=8)
  53. Hash Cond: (i_1.species = s_1.id)
  54. -> Hash Join (cost=134.56..202.70 rows=930 width=16)
  55. Hash Cond: (i_1.id = o.individual)
  56. -> Seq Scan on ee_individual i_1 (cost=0.00..62.07 rows=2307 width=16)
  57. -> Hash (cost=122.94..122.94 rows=930 width=8)
  58. -> HashAggregate (cost=104.34..113.64 rows=930 width=8)
  59. Group Key: o.individual
  60. -> Hash Join (cost=45.41..102.01 rows=930 width=8)
  61. Hash Cond: (o.project = p_3.id)
  62. -> Seq Scan on ee_individual_ownership o (cost=0.00..50.24 rows=2324 width=16)
  63. -> Hash (cost=44.93..44.93 rows=38 width=8)
  64. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  65. Group Key: p_3.id
  66. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  67. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  68. Hash Cond: (direct_p_1.id = m_3.project)
  69. -> Seq Scan on ee_project direct_p_1 (cost=0.00..4.13 rows=113 width=24)
  70. -> Hash (cost=35.97..35.97 rows=3 width=8)
  71. -> Unique (cost=35.93..35.94 rows=3 width=8)
  72. -> Sort (cost=35.93..35.94 rows=3 width=8)
  73. Sort Key: m_3.project
  74. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  75. Hash Cond: (m_3.member_user = u_1.id)
  76. -> Seq Scan on ee_membership m_3 (cost=0.00..19.86 rows=562 width=16)
  77. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  78. -> Hash (cost=14.53..14.53 rows=2 width=8)
  79. -> Seq Scan on ee_user u_1 (cost=0.00..14.53 rows=2 width=8)
  80. Filter: ((login_name)::name = "current_user"())
  81. -> Index Scan using ee_project_rgt_key on ee_project p_3 (cost=0.14..1.08 rows=13 width=24)
  82. Index Cond: (rgt <= direct_p_1.rgt)
  83. Filter: (lft >= direct_p_1.lft)
  84. -> Hash (cost=1.55..1.55 rows=55 width=524)
  85. -> Seq Scan on ee_species s_1 (cost=0.00..1.55 rows=55 width=524)
  86. -> Hash (cost=64.13..64.13 rows=2613 width=16)
  87. -> Seq Scan on ee_tracker t (cost=0.00..64.13 rows=2613 width=16)
  88. -> Hash (cost=62.07..62.07 rows=2307 width=8)
  89. -> Seq Scan on ee_individual i (cost=0.00..62.07 rows=2307 width=8)
  90. -> Hash (cost=4.13..4.13 rows=113 width=8)
  91. -> Seq Scan on ee_project p (cost=0.00..4.13 rows=113 width=8)
  92. -> Index Scan using message_pkey on message m (cost=0.42..4.19 rows=1 width=16)
  93. Index Cond: (id = p_1.id)
  94. -> Hash (cost=243.26..243.26 rows=953 width=16)
  95. -> HashAggregate (cost=224.20..233.73 rows=953 width=16)
  96. Group Key: s_2.device, t_1.device_info_serial
  97. -> Hash Join (cost=142.20..219.43 rows=953 width=16)
  98. Hash Cond: (s_2.device = t_1.id)
  99. -> Hash Join (cost=45.41..120.14 rows=953 width=8)
  100. Hash Cond: (s_2.project = p_4.id)
  101. -> Seq Scan on ee_track_session s_2 (cost=0.00..68.33 rows=2333 width=16)
  102. -> Hash (cost=44.93..44.93 rows=38 width=8)
  103. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  104. Group Key: p_4.id
  105. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  106. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  107. Hash Cond: (direct_p_2.id = m_4.project)
  108. -> Seq Scan on ee_project direct_p_2 (cost=0.00..4.13 rows=113 width=24)
  109. -> Hash (cost=35.97..35.97 rows=3 width=8)
  110. -> Unique (cost=35.93..35.94 rows=3 width=8)
  111. -> Sort (cost=35.93..35.94 rows=3 width=8)
  112. Sort Key: m_4.project
  113. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  114. Hash Cond: (m_4.member_user = u_2.id)
  115. -> Seq Scan on ee_membership m_4 (cost=0.00..19.86 rows=562 width=16)
  116. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  117. -> Hash (cost=14.53..14.53 rows=2 width=8)
  118. -> Seq Scan on ee_user u_2 (cost=0.00..14.53 rows=2 width=8)
  119. Filter: ((login_name)::name = "current_user"())
  120. -> Index Scan using ee_project_rgt_key on ee_project p_4 (cost=0.14..1.08 rows=13 width=24)
  121. Index Cond: (rgt <= direct_p_2.rgt)
  122. Filter: (lft >= direct_p_2.lft)
  123. -> Hash (cost=64.13..64.13 rows=2613 width=16)
  124. -> Seq Scan on ee_tracker t_1 (cost=0.00..64.13 rows=2613 width=16)
  125. -> Hash (cost=41824.35..41824.35 rows=908 width=24)
  126. -> Unique (cost=41806.19..41815.27 rows=908 width=24)
  127. CTE ends
  128. -> Hash Anti Join (cost=163.35..240.43 rows=908 width=16)
  129. Hash Cond: (o_5.device = o_6.device)
  130. Join Filter: ((o_6.start_date <= o_5.end_date) AND (o_6.end_date > o_5.end_date))
  131. -> Hash Join (cost=45.41..106.03 rows=953 width=16)
  132. Hash Cond: (o_5.project = p_10.id)
  133. -> Seq Scan on ee_tracker_ownership o_5 (cost=0.00..53.83 rows=2483 width=24)
  134. -> Hash (cost=44.93..44.93 rows=38 width=8)
  135. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  136. Group Key: p_10.id
  137. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  138. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  139. Hash Cond: (direct_p_8.id = m_10.project)
  140. -> Seq Scan on ee_project direct_p_8 (cost=0.00..4.13 rows=113 width=24)
  141. -> Hash (cost=35.97..35.97 rows=3 width=8)
  142. -> Unique (cost=35.93..35.94 rows=3 width=8)
  143. -> Sort (cost=35.93..35.94 rows=3 width=8)
  144. Sort Key: m_10.project
  145. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  146. Hash Cond: (m_10.member_user = u_8.id)
  147. -> Seq Scan on ee_membership m_10 (cost=0.00..19.86 rows=562 width=16)
  148. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  149. -> Hash (cost=14.53..14.53 rows=2 width=8)
  150. -> Seq Scan on ee_user u_8 (cost=0.00..14.53 rows=2 width=8)
  151. Filter: ((login_name)::name = "current_user"())
  152. -> Index Scan using ee_project_rgt_key on ee_project p_10 (cost=0.14..1.08 rows=13 width=24)
  153. Index Cond: (rgt <= direct_p_8.rgt)
  154. Filter: (lft >= direct_p_8.lft)
  155. -> Hash (cost=106.03..106.03 rows=953 width=24)
  156. -> Hash Join (cost=45.41..106.03 rows=953 width=24)
  157. Hash Cond: (o_6.project = p_11.id)
  158. -> Seq Scan on ee_tracker_ownership o_6 (cost=0.00..53.83 rows=2483 width=32)
  159. -> Hash (cost=44.93..44.93 rows=38 width=8)
  160. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  161. Group Key: p_11.id
  162. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  163. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  164. Hash Cond: (direct_p_9.id = m_11.project)
  165. -> Seq Scan on ee_project direct_p_9 (cost=0.00..4.13 rows=113 width=24)
  166. -> Hash (cost=35.97..35.97 rows=3 width=8)
  167. -> Unique (cost=35.93..35.94 rows=3 width=8)
  168. -> Sort (cost=35.93..35.94 rows=3 width=8)
  169. Sort Key: m_11.project
  170. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  171. Hash Cond: (m_11.member_user = u_9.id)
  172. -> Seq Scan on ee_membership m_11 (cost=0.00..19.86 rows=562 width=16)
  173. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  174. -> Hash (cost=14.53..14.53 rows=2 width=8)
  175. -> Seq Scan on ee_user u_9 (cost=0.00..14.53 rows=2 width=8)
  176. Filter: ((login_name)::name = "current_user"())
  177. -> Index Scan using ee_project_rgt_key on ee_project p_11 (cost=0.14..1.08 rows=13 width=24)
  178. Index Cond: (rgt <= direct_p_9.rgt)
  179. Filter: (lft >= direct_p_9.lft)
  180. -> Sort (cost=41565.75..41568.02 rows=908 width=24)
  181. Sort Key: o_1.device, o_1.start_date, ((SubPlan 2))
  182. -> Hash Anti Join (cost=163.35..41521.14 rows=908 width=24)
  183. Hash Cond: (o_1.device = o_2.device)
  184. Join Filter: ((o_2.start_date < o_1.start_date) AND (o_2.end_date >= o_1.start_date))
  185. -> Hash Join (cost=45.41..106.03 rows=953 width=16)
  186. Hash Cond: (o_1.project = p_5.id)
  187. -> Seq Scan on ee_tracker_ownership o_1 (cost=0.00..53.83 rows=2483 width=24)
  188. -> Hash (cost=44.93..44.93 rows=38 width=8)
  189. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  190. Group Key: p_5.id
  191. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  192. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  193. Hash Cond: (direct_p_3.id = m_5.project)
  194. -> Seq Scan on ee_project direct_p_3 (cost=0.00..4.13 rows=113 width=24)
  195. -> Hash (cost=35.97..35.97 rows=3 width=8)
  196. -> Unique (cost=35.93..35.94 rows=3 width=8)
  197. -> Sort (cost=35.93..35.94 rows=3 width=8)
  198. Sort Key: m_5.project
  199. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  200. Hash Cond: (m_5.member_user = u_3.id)
  201. -> Seq Scan on ee_membership m_5 (cost=0.00..19.86 rows=562 width=16)
  202. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  203. -> Hash (cost=14.53..14.53 rows=2 width=8)
  204. -> Seq Scan on ee_user u_3 (cost=0.00..14.53 rows=2 width=8)
  205. Filter: ((login_name)::name = "current_user"())
  206. -> Index Scan using ee_project_rgt_key on ee_project p_5 (cost=0.14..1.08 rows=13 width=24)
  207. Index Cond: (rgt <= direct_p_3.rgt)
  208. Filter: (lft >= direct_p_3.lft)
  209. -> Hash (cost=106.03..106.03 rows=953 width=24)
  210. -> Hash Join (cost=45.41..106.03 rows=953 width=24)
  211. Hash Cond: (o_2.project = p_6.id)
  212. -> Seq Scan on ee_tracker_ownership o_2 (cost=0.00..53.83 rows=2483 width=32)
  213. -> Hash (cost=44.93..44.93 rows=38 width=8)
  214. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  215. Group Key: p_6.id
  216. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  217. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  218. Hash Cond: (direct_p_4.id = m_6.project)
  219. -> Seq Scan on ee_project direct_p_4 (cost=0.00..4.13 rows=113 width=24)
  220. -> Hash (cost=35.97..35.97 rows=3 width=8)
  221. -> Unique (cost=35.93..35.94 rows=3 width=8)
  222. -> Sort (cost=35.93..35.94 rows=3 width=8)
  223. Sort Key: m_6.project
  224. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  225. Hash Cond: (m_6.member_user = u_4.id)
  226. -> Seq Scan on ee_membership m_6 (cost=0.00..19.86 rows=562 width=16)
  227. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  228. -> Hash (cost=14.53..14.53 rows=2 width=8)
  229. -> Seq Scan on ee_user u_4 (cost=0.00..14.53 rows=2 width=8)
  230. Filter: ((login_name)::name = "current_user"())
  231. -> Index Scan using ee_project_rgt_key on ee_project p_6 (cost=0.14..1.08 rows=13 width=24)
  232. Index Cond: (rgt <= direct_p_4.rgt)
  233. Filter: (lft >= direct_p_4.lft)
  234. SubPlan 2
  235. -> Limit (cost=0.00..45.46 rows=1 width=8)
  236. -> Nested Loop Anti Join (cost=0.00..45.46 rows=1 width=8)
  237. Join Filter: ((e2.e < e.e) AND (e.tracker_id = e2.tracker_id))
  238. -> CTE Scan on ends e (cost=0.00..22.70 rows=2 width=16)
  239. Filter: ((o_1.start_date < e) AND (o_1.device = tracker_id))
  240. -> CTE Scan on ends e2 (cost=0.00..22.70 rows=2 width=16)
  241. Filter: ((o_1.start_date < e) AND (tracker_id = o_1.device))
  242. -> Hash Join (cost=42057.33..42079.24 rows=2 width=12)
  243. Hash Cond: (o_3.device = s_3.device)
  244. Join Filter: ((m_1.date_time >= o_3.start_date) AND (m_1.date_time <= ((SubPlan 4))))
  245. -> Unique (cost=41806.19..41815.27 rows=908 width=24)
  246. CTE ends
  247. -> Hash Anti Join (cost=163.35..240.43 rows=908 width=16)
  248. Hash Cond: (o_7.device = o_8.device)
  249. Join Filter: ((o_8.start_date <= o_7.end_date) AND (o_8.end_date > o_7.end_date))
  250. -> Hash Join (cost=45.41..106.03 rows=953 width=16)
  251. Hash Cond: (o_7.project = p_12.id)
  252. -> Seq Scan on ee_tracker_ownership o_7 (cost=0.00..53.83 rows=2483 width=24)
  253. -> Hash (cost=44.93..44.93 rows=38 width=8)
  254. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  255. Group Key: p_12.id
  256. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  257. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  258. Hash Cond: (direct_p_10.id = m_12.project)
  259. -> Seq Scan on ee_project direct_p_10 (cost=0.00..4.13 rows=113 width=24)
  260. -> Hash (cost=35.97..35.97 rows=3 width=8)
  261. -> Unique (cost=35.93..35.94 rows=3 width=8)
  262. -> Sort (cost=35.93..35.94 rows=3 width=8)
  263. Sort Key: m_12.project
  264. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  265. Hash Cond: (m_12.member_user = u_10.id)
  266. -> Seq Scan on ee_membership m_12 (cost=0.00..19.86 rows=562 width=16)
  267. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  268. -> Hash (cost=14.53..14.53 rows=2 width=8)
  269. -> Seq Scan on ee_user u_10 (cost=0.00..14.53 rows=2 width=8)
  270. Filter: ((login_name)::name = "current_user"())
  271. -> Index Scan using ee_project_rgt_key on ee_project p_12 (cost=0.14..1.08 rows=13 width=24)
  272. Index Cond: (rgt <= direct_p_10.rgt)
  273. Filter: (lft >= direct_p_10.lft)
  274. -> Hash (cost=106.03..106.03 rows=953 width=24)
  275. -> Hash Join (cost=45.41..106.03 rows=953 width=24)
  276. Hash Cond: (o_8.project = p_13.id)
  277. -> Seq Scan on ee_tracker_ownership o_8 (cost=0.00..53.83 rows=2483 width=32)
  278. -> Hash (cost=44.93..44.93 rows=38 width=8)
  279. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  280. Group Key: p_13.id
  281. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  282. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  283. Hash Cond: (direct_p_11.id = m_13.project)
  284. -> Seq Scan on ee_project direct_p_11 (cost=0.00..4.13 rows=113 width=24)
  285. -> Hash (cost=35.97..35.97 rows=3 width=8)
  286. -> Unique (cost=35.93..35.94 rows=3 width=8)
  287. -> Sort (cost=35.93..35.94 rows=3 width=8)
  288. Sort Key: m_13.project
  289. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  290. Hash Cond: (m_13.member_user = u_11.id)
  291. -> Seq Scan on ee_membership m_13 (cost=0.00..19.86 rows=562 width=16)
  292. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  293. -> Hash (cost=14.53..14.53 rows=2 width=8)
  294. -> Seq Scan on ee_user u_11 (cost=0.00..14.53 rows=2 width=8)
  295. Filter: ((login_name)::name = "current_user"())
  296. -> Index Scan using ee_project_rgt_key on ee_project p_13 (cost=0.14..1.08 rows=13 width=24)
  297. Index Cond: (rgt <= direct_p_11.rgt)
  298. Filter: (lft >= direct_p_11.lft)
  299. -> Sort (cost=41565.75..41568.02 rows=908 width=24)
  300. Sort Key: o_3.device, o_3.start_date, ((SubPlan 4))
  301. -> Hash Anti Join (cost=163.35..41521.14 rows=908 width=24)
  302. Hash Cond: (o_3.device = o_4.device)
  303. Join Filter: ((o_4.start_date < o_3.start_date) AND (o_4.end_date >= o_3.start_date))
  304. -> Hash Join (cost=45.41..106.03 rows=953 width=16)
  305. Hash Cond: (o_3.project = p_7.id)
  306. -> Seq Scan on ee_tracker_ownership o_3 (cost=0.00..53.83 rows=2483 width=24)
  307. -> Hash (cost=44.93..44.93 rows=38 width=8)
  308. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  309. Group Key: p_7.id
  310. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  311. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  312. Hash Cond: (direct_p_5.id = m_7.project)
  313. -> Seq Scan on ee_project direct_p_5 (cost=0.00..4.13 rows=113 width=24)
  314. -> Hash (cost=35.97..35.97 rows=3 width=8)
  315. -> Unique (cost=35.93..35.94 rows=3 width=8)
  316. -> Sort (cost=35.93..35.94 rows=3 width=8)
  317. Sort Key: m_7.project
  318. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  319. Hash Cond: (m_7.member_user = u_5.id)
  320. -> Seq Scan on ee_membership m_7 (cost=0.00..19.86 rows=562 width=16)
  321. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  322. -> Hash (cost=14.53..14.53 rows=2 width=8)
  323. -> Seq Scan on ee_user u_5 (cost=0.00..14.53 rows=2 width=8)
  324. Filter: ((login_name)::name = "current_user"())
  325. -> Index Scan using ee_project_rgt_key on ee_project p_7 (cost=0.14..1.08 rows=13 width=24)
  326. Index Cond: (rgt <= direct_p_5.rgt)
  327. Filter: (lft >= direct_p_5.lft)
  328. -> Hash (cost=106.03..106.03 rows=953 width=24)
  329. -> Hash Join (cost=45.41..106.03 rows=953 width=24)
  330. Hash Cond: (o_4.project = p_8.id)
  331. -> Seq Scan on ee_tracker_ownership o_4 (cost=0.00..53.83 rows=2483 width=32)
  332. -> Hash (cost=44.93..44.93 rows=38 width=8)
  333. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  334. Group Key: p_8.id
  335. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  336. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  337. Hash Cond: (direct_p_6.id = m_8.project)
  338. -> Seq Scan on ee_project direct_p_6 (cost=0.00..4.13 rows=113 width=24)
  339. -> Hash (cost=35.97..35.97 rows=3 width=8)
  340. -> Unique (cost=35.93..35.94 rows=3 width=8)
  341. -> Sort (cost=35.93..35.94 rows=3 width=8)
  342. Sort Key: m_8.project
  343. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  344. Hash Cond: (m_8.member_user = u_6.id)
  345. -> Seq Scan on ee_membership m_8 (cost=0.00..19.86 rows=562 width=16)
  346. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  347. -> Hash (cost=14.53..14.53 rows=2 width=8)
  348. -> Seq Scan on ee_user u_6 (cost=0.00..14.53 rows=2 width=8)
  349. Filter: ((login_name)::name = "current_user"())
  350. -> Index Scan using ee_project_rgt_key on ee_project p_8 (cost=0.14..1.08 rows=13 width=24)
  351. Index Cond: (rgt <= direct_p_6.rgt)
  352. Filter: (lft >= direct_p_6.lft)
  353. SubPlan 4
  354. -> Limit (cost=0.00..45.46 rows=1 width=8)
  355. -> Nested Loop Anti Join (cost=0.00..45.46 rows=1 width=8)
  356. Join Filter: ((e2_1.e < e_1.e) AND (e_1.tracker_id = e2_1.tracker_id))
  357. -> CTE Scan on ends e_1 (cost=0.00..22.70 rows=2 width=16)
  358. Filter: ((o_3.start_date < e) AND (o_3.device = tracker_id))
  359. -> CTE Scan on ends e2_1 (cost=0.00..22.70 rows=2 width=16)
  360. Filter: ((o_3.start_date < e) AND (tracker_id = o_3.device))
  361. -> Hash (cost=251.08..251.08 rows=5 width=28)
  362. -> Hash Join (cost=228.40..251.08 rows=5 width=28)
  363. Hash Cond: (t_2.device_info_serial = m_1.device_info_serial)
  364. -> HashAggregate (cost=224.20..233.73 rows=953 width=16)
  365. Group Key: s_3.device, t_2.device_info_serial
  366. -> Hash Join (cost=142.20..219.43 rows=953 width=16)
  367. Hash Cond: (s_3.device = t_2.id)
  368. -> Hash Join (cost=45.41..120.14 rows=953 width=8)
  369. Hash Cond: (s_3.project = p_9.id)
  370. -> Seq Scan on ee_track_session s_3 (cost=0.00..68.33 rows=2333 width=16)
  371. -> Hash (cost=44.93..44.93 rows=38 width=8)
  372. -> HashAggregate (cost=44.17..44.55 rows=38 width=8)
  373. Group Key: p_9.id
  374. -> Nested Loop (cost=36.15..44.08 rows=38 width=8)
  375. -> Hash Join (cost=36.01..40.45 rows=3 width=16)
  376. Hash Cond: (direct_p_7.id = m_9.project)
  377. -> Seq Scan on ee_project direct_p_7 (cost=0.00..4.13 rows=113 width=24)
  378. -> Hash (cost=35.97..35.97 rows=3 width=8)
  379. -> Unique (cost=35.93..35.94 rows=3 width=8)
  380. -> Sort (cost=35.93..35.94 rows=3 width=8)
  381. Sort Key: m_9.project
  382. -> Hash Join (cost=14.55..35.91 rows=3 width=8)
  383. Hash Cond: (m_9.member_user = u_7.id)
  384. -> Seq Scan on ee_membership m_9 (cost=0.00..19.86 rows=562 width=16)
  385. Filter: (((status)::text = 'APPROVED'::text) AND ((role)::text = ANY ('{BASE,ADMIN,LEADER}'::text[])))
  386. -> Hash (cost=14.53..14.53 rows=2 width=8)
  387. -> Seq Scan on ee_user u_7 (cost=0.00..14.53 rows=2 width=8)
  388. Filter: ((login_name)::name = "current_user"())
  389. -> Index Scan using ee_project_rgt_key on ee_project p_9 (cost=0.14..1.08 rows=13 width=24)
  390. Index Cond: (rgt <= direct_p_7.rgt)
  391. Filter: (lft >= direct_p_7.lft)
  392. -> Hash (cost=64.13..64.13 rows=2613 width=16)
  393. -> Seq Scan on ee_tracker t_2 (cost=0.00..64.13 rows=2613 width=16)
  394. -> Hash (cost=4.19..4.19 rows=1 width=24)
  395. -> Index Scan using message_pkey on message m_1 (cost=0.42..4.19 rows=1 width=24)
  396. Index Cond: (id = p_1.id)
  397. (394 rows)
  398.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement