explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JJOAB

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 2,642.326 ↓ 6.0 6 1

Group (cost=1.01..139,023.72 rows=1 width=643) (actual time=10.457..2,642.326 rows=6 loops=1)

  • Group Key: dl.name, dlitem.id
2. 0.076 2,642.305 ↓ 6.0 6 1

Nested Loop (cost=1.01..139,023.71 rows=1 width=643) (actual time=10.454..2,642.305 rows=6 loops=1)

  • Join Filter: (dl.id = dlgc.data_list_id)
  • Rows Removed by Join Filter: 180
3. 39.350 2,640.951 ↓ 6.0 6 1

Nested Loop Semi Join (cost=1.01..138,999.22 rows=1 width=651) (actual time=10.432..2,640.951 rows=6 loops=1)

  • Join Filter: ((((doc.content -> 'model'::text) -> (dl.name)::text) ->> 'acronym'::text) = ((dlitem.content -> 'properties'::text) ->> 'acronym'::text))
  • Rows Removed by Join Filter: 21,580
4. 0.043 75.371 ↓ 7.0 7 1

Nested Loop (cost=0.57..1,878.12 rows=1 width=651) (actual time=7.648..75.371 rows=7 loops=1)

5. 11.245 74.995 ↑ 1.3 37 1

Nested Loop (cost=0.29..1,858.54 rows=49 width=651) (actual time=7.558..74.995 rows=37 loops=1)

  • Join Filter: (dlitem.data_list_id = dl.id)
  • Rows Removed by Join Filter: 19,874
6. 63.750 63.750 ↑ 1.0 19,911 1

Index Scan using "data_list_itemPK" on data_list_item dlitem (cost=0.29..939.44 rows=19,911 width=631) (actual time=0.014..63.750 rows=19,911 loops=1)

7. 0.000 0.000 ↑ 3.0 1 19,911

Materialize (cost=0.00..23.12 rows=3 width=20) (actual time=0.000..0.000 rows=1 loops=19,911)

8. 0.279 0.279 ↑ 3.0 1 1

Seq Scan on data_list dl (cost=0.00..23.10 rows=3 width=20) (actual time=0.018..0.279 rows=1 loops=1)

  • Filter: ((name)::text = 'trecho'::text)
  • Rows Removed by Filter: 1,207
9. 0.333 0.333 ↓ 0.0 0 37

Index Scan using "data_list_itemPK" on data_list_item dlitemparent (cost=0.29..0.39 rows=1 width=8) (actual time=0.008..0.009 rows=0 loops=37)

  • Index Cond: (id = dlitem.parent_id)
  • Filter: ((content -> 'properties'::text) = '{"name": "Seccionamento", "acronym": "SC"}'::jsonb)
  • Rows Removed by Filter: 1
10. 96.739 2,526.230 ↑ 3.0 3,084 7

Materialize (cost=0.43..136,105.74 rows=9,104 width=659) (actual time=0.032..360.890 rows=3,084 loops=7)

11. 23.680 2,429.491 ↓ 2.2 20,136 1

Nested Loop Semi Join (cost=0.43..135,295.22 rows=9,104 width=659) (actual time=0.216..2,429.491 rows=20,136 loops=1)

12. 1,600.331 1,600.331 ↑ 1.0 20,137 1

Seq Scan on document doc (cost=0.00..14,709.86 rows=20,349 width=667) (actual time=0.175..1,600.331 rows=20,137 loops=1)

  • Filter: (project_id = 104)
  • Rows Removed by Filter: 102,892
13. 805.480 805.480 ↑ 6.0 1 20,137

Index Scan using vcl_document_id_idx on vcl (cost=0.43..25.11 rows=6 width=8) (actual time=0.040..0.040 rows=1 loops=20,137)

  • Index Cond: (document_id = doc.id)
  • Filter: (((office_id IS NULL) OR (office_id = 119)) AND ((profile_id IS NULL) OR (profile_id = ANY ('{144,155,1492,1948,146,2012,149,147,153,150,1493,2286}'::bigint[]))))
  • Rows Removed by Filter: 3
14. 1.278 1.278 ↑ 1.0 31 6

Seq Scan on data_list_config_item_group dlgc (cost=0.00..24.10 rows=31 width=8) (actual time=0.011..0.213 rows=31 loops=6)

  • Filter: (config_item_group_id = 104)
  • Rows Removed by Filter: 1,177
Planning time : 20.182 ms
Execution time : 2,644.822 ms