explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gNHI

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 3,181.924 ↓ 1.5 3 1

Limit (cost=1,943,772.44..1,943,772.44 rows=2 width=33) (actual time=3,181.917..3,181.924 rows=3 loops=1)

2. 0.026 3,181.915 ↓ 1.5 3 1

Sort (cost=1,943,772.44..1,943,772.44 rows=2 width=33) (actual time=3,181.912..3,181.915 rows=3 loops=1)

  • Sort Key: t_sys_users.c_username NULLS FIRST
  • Sort Method: quicksort Memory: 25kB
3. 0.051 3,181.889 ↓ 1.5 3 1

Group (cost=1,000.28..1,943,772.43 rows=2 width=33) (actual time=2,515.913..3,181.889 rows=3 loops=1)

  • Group Key: t_sys_users.c_userid
4. 220.868 3,181.838 ↓ 16.5 33 1

Nested Loop Left Join (cost=1,000.28..1,943,772.42 rows=2 width=33) (actual time=2,515.907..3,181.838 rows=33 loops=1)

  • Join Filter: (t_sys_fieldpermission.c_fieldschemaid = t_e20so1_document_boolean_history_tags.c_fieldsid)
  • Rows Removed by Join Filter: 315546
  • Filter: (((t_sys_fieldpermission.c_roleid = 2) AND t_sys_fieldpermission.c_isdisplay) OR (t_e20so1_fielddetails.c_isprivate AND (t_e20so1_fielddetails.c_createdby = 71939)))
5. 122.212 2,734.128 ↓ 16.5 33 1

Nested Loop Left Join (cost=1,000.28..1,943,122.88 rows=2 width=58) (actual time=2,498.000..2,734.128 rows=33 loops=1)

  • Join Filter: (t_e20so1_fielddetails.c_fieldschemaid = t_e20so1_document_boolean_history_tags.c_fieldsid)
  • Rows Removed by Join Filter: 174306
6. 1.233 2,486.318 ↓ 16.5 33 1

Nested Loop (cost=1,000.28..1,942,810.16 rows=2 width=49) (actual time=2,484.476..2,486.318 rows=33 loops=1)

  • Join Filter: (t_e20so1_document_boolean_history_tags.c_createdby = t_sys_users.c_userid)
  • Rows Removed by Join Filter: 1551
7. 0.077 0.077 ↓ 1.1 48 1

Index Scan using pk_sys_users on t_sys_users (cost=0.14..4.21 rows=44 width=33) (actual time=0.014..0.077 rows=48 loops=1)

  • Index Cond: (c_userid IS NOT NULL)
8. 1.029 2,485.008 ↓ 16.5 33 48

Materialize (cost=1,000.14..1,942,804.63 rows=2 width=24) (actual time=19.072..51.771 rows=33 loops=48)

9. 9.662 2,483.979 ↓ 16.5 33 1

Gather (cost=1,000.14..1,942,804.62 rows=2 width=24) (actual time=915.419..2,483.979 rows=33 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
10. 0.029 2,474.317 ↓ 4.0 4 8 / 8

Nested Loop (cost=0.14..1,941,804.42 rows=1 width=24) (actual time=1,982.483..2,474.317 rows=4 loops=8)

11. 2,474.140 2,474.140 ↓ 4.0 4 8 / 8

Parallel Seq Scan on t_e20so1_document_boolean_history_tags (cost=0.00..1,941,797.39 rows=1 width=32) (actual time=1,982.403..2,474.140 rows=4 loops=8)

  • Filter: (c_actiontype = 5)
  • Rows Removed by Filter: 13350978
12. 0.033 0.148 ↑ 4.0 1 33 / 8

Append (cost=0.14..6.99 rows=4 width=8) (actual time=0.025..0.036 rows=1 loops=33)

13. 0.021 0.021 ↓ 0.0 0 33 / 8

Index Only Scan using t_e20so1_document_datastore_1_pkey on t_e20so1_document_datastore_1 t_e20so1_document (cost=0.14..1.80 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=33)

  • Index Cond: (c_documentid = t_e20so1_document_boolean_history_tags.c_docid)
  • Heap Fetches: 0
14. 0.070 0.070 ↑ 1.0 1 33 / 8

Index Only Scan using t_e20so1_document_datastore_2_c_documentid_idx on t_e20so1_document_datastore_2 t_e20so1_document_1 (cost=0.43..1.55 rows=1 width=8) (actual time=0.016..0.017 rows=1 loops=33)

  • Index Cond: (c_documentid = t_e20so1_document_boolean_history_tags.c_docid)
  • Heap Fetches: 0
15. 0.012 0.012 ↓ 0.0 0 33 / 8

Index Only Scan using t_e20so1_document_datastore_3_pkey on t_e20so1_document_datastore_3 t_e20so1_document_2 (cost=0.14..1.80 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=33)

  • Index Cond: (c_documentid = t_e20so1_document_boolean_history_tags.c_docid)
  • Heap Fetches: 0
16. 0.012 0.012 ↓ 0.0 0 33 / 8

Index Only Scan using t_e20so1_document_datastore_default_pkey on t_e20so1_document_datastore_default t_e20so1_document_3 (cost=0.14..1.81 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=33)

  • Index Cond: (c_documentid = t_e20so1_document_boolean_history_tags.c_docid)
  • Heap Fetches: 0
17. 121.228 125.598 ↓ 1.0 5,283 33

Materialize (cost=0.00..170.55 rows=5,170 width=25) (actual time=0.001..3.806 rows=5,283 loops=33)

18. 4.370 4.370 ↓ 1.0 5,283 1

Seq Scan on t_e20so1_fielddetails (cost=0.00..144.70 rows=5,170 width=25) (actual time=0.014..4.370 rows=5,283 loops=1)

19. 219.051 226.842 ↓ 1.0 9,563 33

Materialize (cost=0.00..307.72 rows=9,115 width=25) (actual time=0.001..6.874 rows=9,563 loops=33)

20. 7.791 7.791 ↓ 1.0 9,563 1

Seq Scan on t_sys_fieldpermission (cost=0.00..262.15 rows=9,115 width=25) (actual time=0.009..7.791 rows=9,563 loops=1)