explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NNKy

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 89.213 ↓ 6.0 6 1

Group (cost=19,417.39..19,417.40 rows=1 width=643) (actual time=89.210..89.213 rows=6 loops=1)

  • Group Key: dl.name, dlitem.id
2. 0.010 89.208 ↓ 6.0 6 1

Sort (cost=19,417.39..19,417.40 rows=1 width=643) (actual time=89.208..89.208 rows=6 loops=1)

  • Sort Key: dlitem.id
  • Sort Method: quicksort Memory: 26kB
3. 0.023 89.198 ↓ 6.0 6 1

Nested Loop (cost=23.88..19,417.38 rows=1 width=643) (actual time=0.796..89.198 rows=6 loops=1)

  • Join Filter: (dl.id = dlgc.data_list_id)
  • Rows Removed by Join Filter: 180
4. 16.621 88.299 ↓ 6.0 6 1

Nested Loop Semi Join (cost=23.88..19,390.45 rows=1 width=651) (actual time=0.789..88.299 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: 20,599
5. 0.016 4.639 ↓ 7.0 7 1

Nested Loop (cost=23.88..675.59 rows=1 width=651) (actual time=0.464..4.639 rows=7 loops=1)

6. 2.524 4.512 ↑ 1.3 37 1

Hash Join (cost=23.59..656.01 rows=49 width=651) (actual time=0.270..4.512 rows=37 loops=1)

  • Hash Cond: (dlitem.data_list_id = dl.id)
7. 1.773 1.773 ↑ 1.0 20,511 1

Seq Scan on data_list_item dlitem (cost=0.00..555.11 rows=20,511 width=631) (actual time=0.005..1.773 rows=20,511 loops=1)

8. 0.001 0.215 ↑ 3.0 1 1

Hash (cost=23.55..23.55 rows=3 width=20) (actual time=0.215..0.215 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.214 0.214 ↑ 3.0 1 1

Seq Scan on data_list dl (cost=0.00..23.55 rows=3 width=20) (actual time=0.009..0.214 rows=1 loops=1)

  • Filter: ((name)::text = 'trecho'::text)
  • Rows Removed by Filter: 1,243
10. 0.111 0.111 ↓ 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.003..0.003 rows=0 loops=37)

  • Index Cond: (id = dlitem.parent_id)
  • Filter: ((content -> 'properties'::text) = '{"name": "Seccionamento", "acronym": "SC"}'::jsonb)
  • Rows Removed by Filter: 1
11. 18.859 67.039 ↑ 6.9 2,944 7

Materialize (cost=0.00..16,453.10 rows=20,282 width=658) (actual time=0.003..9.577 rows=2,944 loops=7)

12. 48.180 48.180 ↑ 1.0 20,074 1

Seq Scan on document doc (cost=0.00..14,647.69 rows=20,282 width=658) (actual time=0.020..48.180 rows=20,074 loops=1)

  • Filter: (project_id = 104)
  • Rows Removed by Filter: 102,701
13. 0.876 0.876 ↑ 1.0 31 6

Seq Scan on data_list_config_item_group dlgc (cost=0.00..26.55 rows=31 width=8) (actual time=0.004..0.146 rows=31 loops=6)

  • Filter: (config_item_group_id = 104)
  • Rows Removed by Filter: 1,213
Planning time : 0.635 ms
Execution time : 90.363 ms