explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QUbB

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.517 ↓ 3.0 3 1

Sort (cost=162.65..162.66 rows=1 width=297) (actual time=0.517..0.517 rows=3 loops=1)

  • Sort Key: (dense_rank() OVER (?))
  • Sort Method: quicksort Memory: 25kB
2. 0.021 0.509 ↓ 3.0 3 1

Nested Loop Left Join (cost=90.80..162.64 rows=1 width=297) (actual time=0.350..0.509 rows=3 loops=1)

3. 0.002 0.225 ↓ 3.0 3 1

Limit (cost=90.52..90.54 rows=1 width=227) (actual time=0.218..0.225 rows=3 loops=1)

4. 0.013 0.223 ↓ 3.0 3 1

WindowAgg (cost=90.52..90.54 rows=1 width=227) (actual time=0.217..0.223 rows=3 loops=1)

5. 0.006 0.210 ↓ 3.0 3 1

Sort (cost=90.52..90.53 rows=1 width=219) (actual time=0.209..0.210 rows=3 loops=1)

  • Sort Key: dn.document_id DESC
  • Sort Method: quicksort Memory: 25kB
6. 0.004 0.204 ↓ 3.0 3 1

Nested Loop (cost=55.83..90.51 rows=1 width=219) (actual time=0.191..0.204 rows=3 loops=1)

7. 0.004 0.188 ↑ 1.3 3 1

Nested Loop (cost=55.54..88.51 rows=4 width=171) (actual time=0.182..0.188 rows=3 loops=1)

8. 0.004 0.175 ↑ 1.3 3 1

HashAggregate (cost=55.26..55.30 rows=4 width=8) (actual time=0.175..0.175 rows=3 loops=1)

  • Group Key: r.document_id
9. 0.000 0.171 ↑ 1.3 3 1

Nested Loop (cost=16.35..55.25 rows=4 width=8) (actual time=0.133..0.171 rows=3 loops=1)

10. 0.026 0.038 ↓ 3.8 15 1

Bitmap Heap Scan on resolution r (cost=8.03..21.88 rows=4 width=16) (actual time=0.021..0.038 rows=15 loops=1)

  • Recheck Cond: (tags ? 'expedited_consideration'::text)
  • Heap Blocks: exact=5
11. 0.012 0.012 ↓ 3.8 15 1

Bitmap Index Scan on resolution_tags_gin_idx (cost=0.00..8.03 rows=4 width=0) (actual time=0.012..0.012 rows=15 loops=1)

  • Index Cond: (tags ? 'expedited_consideration'::text)
12. 0.015 0.135 ↓ 0.0 0 15

Limit (cost=8.32..8.32 rows=1 width=16) (actual time=0.008..0.009 rows=0 loops=15)

13. 0.015 0.120 ↓ 0.0 0 15

Sort (cost=8.32..8.32 rows=1 width=16) (actual time=0.008..0.008 rows=0 loops=15)

  • Sort Key: rl.cdate DESC
  • Sort Method: quicksort Memory: 25kB
14. 0.105 0.105 ↓ 0.0 0 15

Index Scan using rlog_event_id_index on rlog rl (cost=0.28..8.31 rows=1 width=16) (actual time=0.006..0.007 rows=0 loops=15)

  • Index Cond: (event_id = 77)
  • Filter: ((obj_id = r.id) AND (user_id = 76108932) AND (extra = '1'::text))
  • Rows Removed by Filter: 25
15. 0.009 0.009 ↑ 1.0 1 3

Index Scan using document_pk11118759906747_1_1 on document d (cost=0.28..8.30 rows=1 width=163) (actual time=0.003..0.003 rows=1 loops=3)

  • Index Cond: (id = r.document_id)
16. 0.012 0.012 ↑ 1.0 1 3

Index Scan using document_n_uniq_idx on document_n dn (cost=0.29..0.49 rows=1 width=56) (actual time=0.004..0.004 rows=1 loops=3)

  • Index Cond: ((document_id = d.id) AND (org_id = 2))
  • Filter: ((category >= 0) AND (d_deleted = 0) AND (n_type = 0) AND (CASE WHEN ((num)::character varying IS NULL) THEN 0 ELSE 1 END = 1) AND (status = 8) AND ((cdate)::date >= '2019-07-08'::date) AND ((cdate)::date <= '2019-08-07'::date))
17. 0.003 0.003 ↓ 0.0 0 3

Index Scan using document_og_document_id_idx on document_og dog (cost=0.28..8.29 rows=1 width=26) (actual time=0.001..0.001 rows=0 loops=3)

  • Index Cond: (document_id = d.id)
18.          

SubPlan (forNested Loop Left Join)

19. 0.009 0.009 ↓ 0.0 0 3

Index Only Scan using r_sc_isproj_docid_id on resolution (cost=0.28..8.30 rows=1 width=0) (actual time=0.003..0.003 rows=0 loops=3)

  • Index Cond: ((special_control = 1) AND (is_project = 0) AND (document_id = d.id))
  • Heap Fetches: 0
20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using r_sc_isproj_docid_id on resolution resolution_1 (cost=0.28..15.40 rows=5 width=8) (never executed)

  • Index Cond: ((special_control = 1) AND (is_project = 0))
  • Heap Fetches: 0
21. 0.012 0.012 ↑ 1.0 1 3

Index Only Scan using dr_uid_did on document_read (cost=0.29..8.30 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=3)

  • Index Cond: ((user_id = 76108932) AND (document_id = d.id))
  • Heap Fetches: 3
22. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on document_read document_read_1 (cost=5.76..97.13 rows=190 width=8) (never executed)

  • Recheck Cond: (user_id = 76108932)
23. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on dr_uid_did (cost=0.00..5.71 rows=190 width=0) (never executed)

  • Index Cond: (user_id = 76108932)
24. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_folder_document (cost=0.00..1.45 rows=1 width=0) (never executed)

  • Filter: ((document_id = d.id) AND (user_id = 76108932))
25. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on user_folder_document user_folder_document_1 (cost=0.00..1.38 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1)

  • Filter: (user_id = 76108932)
  • Rows Removed by Filter: 29
26. 0.057 0.057 ↓ 0.0 0 3

Seq Scan on document_in_b (cost=0.00..4.99 rows=2 width=0) (actual time=0.019..0.019 rows=0 loops=3)

  • Filter: (document_id = d.id)
  • Rows Removed by Filter: 239
27. 0.000 0.000 ↓ 0.0 0

Seq Scan on document_in_b document_in_b_1 (cost=0.00..4.39 rows=239 width=8) (never executed)

28. 0.126 0.126 ↓ 0.0 0 3

Seq Scan on document_in_d (cost=0.00..12.15 rows=3 width=0) (actual time=0.042..0.042 rows=0 loops=3)

  • Filter: ((document_id = d.id) OR (in_document_id = d.id))
  • Rows Removed by Filter: 417
29. 0.000 0.009 ↓ 0.0 0 3

Limit (cost=0.29..10.14 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=3)

30. 0.009 0.009 ↓ 0.0 0 3

Index Scan using document_n_uniq_idx on document_n (cost=0.29..10.14 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=3)

  • Index Cond: (document_id = d.id)
  • Filter: (medo_direction IS NOT NULL)
  • Rows Removed by Filter: 2
31. 0.000 0.006 ↓ 0.0 0 3

Nested Loop (cost=0.57..16.83 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=3)

32. 0.006 0.006 ↓ 0.0 0 3

Index Scan using du_docid_idx on document_urgency du (cost=0.28..8.50 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=3)

  • Index Cond: (document_id = d.id)
  • Filter: ((urgency > 0) OR (ceil(((date_part('day'::text, (exec_date - (CURRENT_DATE)::timestamp without time zone)))::integer)::double precision) <= '10'::double precision))
33. 0.000 0.000 ↓ 0.0 0

Index Only Scan using usr_ugid_idx on usr u (cost=0.29..8.31 rows=1 width=8) (never executed)

  • Index Cond: ((id = du.user_id) AND (group_id = 2))
  • Heap Fetches: 0
34. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1,333.26..1,382.23 rows=7 width=8) (never executed)

  • Hash Cond: (du_1.user_id = u_1.id)
35. 0.000 0.000 ↓ 0.0 0

Seq Scan on document_urgency du_1 (cost=0.00..47.84 rows=433 width=16) (never executed)

  • Filter: ((urgency > 0) OR (ceil(((date_part('day'::text, (exec_date - (CURRENT_DATE)::timestamp without time zone)))::integer)::double precision) <= '10'::double precision))
36. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,324.38..1,324.38 rows=710 width=8) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Index Scan using quest_sx_idx611b3981b197b636e7 on usr u_1 (cost=0.29..1,324.38 rows=710 width=8) (never executed)

  • Index Cond: (group_id = 2)
38. 0.003 0.033 ↓ 0.0 0 3

Limit (cost=0.58..12.21 rows=1 width=32) (actual time=0.010..0.011 rows=0 loops=3)

39. 0.000 0.030 ↓ 0.0 0 3

Nested Loop (cost=0.58..12.21 rows=1 width=32) (actual time=0.010..0.010 rows=0 loops=3)

40. 0.000 0.030 ↓ 0.0 0 3

Nested Loop (cost=0.29..11.66 rows=1 width=20) (actual time=0.010..0.010 rows=0 loops=3)

41. 0.030 0.030 ↓ 0.0 0 3

Seq Scan on covering_letter cl (cost=0.00..3.35 rows=1 width=8) (actual time=0.010..0.010 rows=0 loops=3)

  • Filter: (document_id = d.id)
  • Rows Removed by Filter: 108
42. 0.000 0.000 ↓ 0.0 0

Index Scan using usr_ugid_idx on usr u_2 (cost=0.29..8.31 rows=1 width=28) (never executed)

  • Index Cond: (id = cl.sign)
43. 0.000 0.000 ↓ 0.0 0

Index Scan using sys_c0014946 on user_group ug (cost=0.29..0.55 rows=1 width=46) (never executed)

  • Index Cond: (id = u_2.group_id)
Planning time : 4.339 ms
Execution time : 0.775 ms