explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RFAT : test

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

Aggregate (cost=85,019.60..85,019.61 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=74,242.67..85,016.56 rows=1,214 width=8) (actual rows= loops=)

  • Hash Cond: (events._event_class_id = eventclass._id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=74,241.55..84,998.76 rows=1,214 width=16) (actual rows= loops=)

  • Hash Cond: (events._project_id = project._id)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=74,212.93..84,953.44 rows=1,214 width=24) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=74,212.93..75,160.32 rows=1,214 width=96) (actual rows= loops=)

  • Hash Cond: (a._project_id = f._id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=74,184.31..75,115.01 rows=1,214 width=104) (actual rows= loops=)

  • Hash Cond: (c_event_flow_log._cur_status_id = status._id)
  • Filter: (status._opers IS NULL)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=74,182.66..75,096.66 rows=1,214 width=112) (actual rows= loops=)

  • Hash Cond: (b._id = eventdevice._device_id)
8. 0.000 0.000 ↓ 0.0

Append (cost=837.93..1,650.38 rows=4,769 width=50) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

HashAggregate (cost=837.93..844.89 rows=214 width=50) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..834.72 rows=214 width=50) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Index Scan using uk8frdlw4f6gcdhhw0g8l96vcd8 on c_account_project a (cost=0.00..11.94 rows=2 width=25) (actual rows= loops=)

  • Index Cond: (_account_id = 1,119::bigint)
12. 0.000 0.000 ↓ 0.0

Index Scan using idx_device_project_id on c_device b (cost=0.00..408.64 rows=220 width=33) (actual rows= loops=)

  • Index Cond: (b._project_id = a._project_id)
13. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 2" (cost=500.71..501.16 rows=15 width=50) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

HashAggregate (cost=500.71..501.01 rows=15 width=50) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..500.52 rows=15 width=50) (actual rows= loops=)

  • Join Filter: (b._ori_project_id = e._project_id)
16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..443.03 rows=150 width=41) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using uk8frdlw4f6gcdhhw0g8l96vcd8 on c_account_project a (cost=0.00..11.94 rows=2 width=25) (actual rows= loops=)

  • Index Cond: (_account_id = 1,119::bigint)
18. 0.000 0.000 ↓ 0.0

Index Scan using c_user_device_index on c_user_device b (cost=0.00..209.02 rows=522 width=24) (actual rows= loops=)

  • Index Cond: (b._project_id = a._project_id)
19. 0.000 0.000 ↓ 0.0

Index Scan using c_device_pkey on c_device e (cost=0.00..0.37 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (e._id = b._device_id)
20. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 3" (cost=166.00..302.20 rows=4,540 width=50) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

HashAggregate (cost=166.00..256.80 rows=4,540 width=50) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.27..109.25 rows=4,540 width=50) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.27..77.95 rows=1 width=33) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on c_account_project a (cost=4.27..10.69 rows=2 width=25) (actual rows= loops=)

  • Recheck Cond: (_account_id = 1,119::bigint)
25. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on uk8frdlw4f6gcdhhw0g8l96vcd8 (cost=0.00..4.27 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (_account_id = 1,119::bigint)
26. 0.000 0.000 ↓ 0.0

Index Scan using c_user_device__device_id__ori_project_id__project_id__sensor_id on c_user_device b (cost=0.00..33.61 rows=2 width=16) (actual rows= loops=)

  • Index Cond: ((b._device_id IS NULL) AND (b._project_id = a._project_id) AND (b._sensor_id IS NULL))
27. 0.000 0.000 ↓ 0.0

Index Scan using idx_device_project_id on c_device e (cost=0.00..28.55 rows=220 width=33) (actual rows= loops=)

  • Index Cond: (e._project_id = b._ori_project_id)
28. 0.000 0.000 ↓ 0.0

Hash (cost=73,318.60..73,318.60 rows=2,090 width=112) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..73,318.60 rows=2,090 width=112) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on c_event_flow_log (cost=0.00..51,094.78 rows=1,636 width=59) (actual rows= loops=)

  • Filter: (((_events_id)::text ~~ '1032%'::text) AND (upper((_flow_status)::text) = ANY ('{S,P,E}'::text[])))
31. 0.000 0.000 ↓ 0.0

Index Scan using idx_event_device_device_id on c_event_device eventdevice (cost=0.00..13.55 rows=3 width=53) (actual rows= loops=)

  • Index Cond: ((eventdevice._events_id)::text = (c_event_flow_log._events_id)::text)
32. 0.000 0.000 ↓ 0.0

Hash (cost=1.29..1.29 rows=29 width=524) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on c_event_status status (cost=0.00..1.29 rows=29 width=524) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Hash (cost=21.61..21.61 rows=561 width=8) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Seq Scan on c_project f (cost=0.00..21.61 rows=561 width=8) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Index Scan using c_events_pkey on c_events events (cost=0.00..8.05 rows=1 width=61) (actual rows= loops=)

  • Index Cond: ((events._id)::text = (c_event_flow_log._events_id)::text)
37. 0.000 0.000 ↓ 0.0

Hash (cost=21.61..21.61 rows=561 width=8) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on c_project project (cost=0.00..21.61 rows=561 width=8) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=8) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Seq Scan on c_event_class eventclass (cost=0.00..1.05 rows=5 width=8) (actual rows= loops=)