explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g7YI

Settings
# exclusive inclusive rows x rows loops node
1. 0.269 645.841 ↓ 6.9 144 1

HashAggregate (cost=42,702.90..42,703.11 rows=21 width=1,148) (actual time=645.814..645.841 rows=144 loops=1)

  • Group Key: (CASE WHEN (dcm.entity_field_id IS NOT NULL) THEN get_label_by_id((ef.alias)::text, ef.alias_label_id, 1005, 1) WHEN (dcm.system_label_id IS NOT NULL) THEN get_label_by_id((dlccm.name)::text, dcm.system_label_id, 1005, 1) WHEN (dlccm.name IS NOT NULL) THEN dlccm.name ELSE dcm.name END), (CASE WHEN (dlccm.sort_order IS NOT NULL) THEN dlccm.sort_order ELSE dcm.sort_order END), dcm.id, dcm.name, dcm.display_format, dcm.type, dcm.sql_name, dcm.is_excel, dcm.entity_field_id, dlccm.deleted, (NULL::boolean), ef.is_dynamic_field, (NULL::integer)
2. 0.030 645.572 ↓ 6.9 144 1

Append (cost=8.89..42,702.21 rows=21 width=1,148) (actual time=554.555..645.572 rows=144 loops=1)

3. 2.996 638.273 ↓ 3.2 65 1

Nested Loop Left Join (cost=8.89..42,192.80 rows=20 width=135) (actual time=554.554..638.273 rows=65 loops=1)

  • Filter: CASE WHEN (dcm.entity_field_id IS NOT NULL) THEN ef.active ELSE true END
  • Rows Removed by Filter: 99
4. 0.192 634.785 ↓ 4.2 164 1

Nested Loop Left Join (cost=8.61..42,168.94 rows=39 width=120) (actual time=82.147..634.785 rows=164 loops=1)

5. 180.655 633.937 ↓ 4.2 164 1

Hash Join (cost=8.32..42,156.73 rows=39 width=24) (actual time=82.121..633.937 rows=164 loops=1)

  • Hash Cond: (dlccm.list_client_id = dlcm.id)
6. 453.267 453.267 ↓ 1.0 1,716,509 1

Seq Scan on dynamic_list_column_client_metadata dlccm (cost=0.00..35,712.49 rows=1,716,141 width=28) (actual time=0.053..453.267 rows=1,716,509 loops=1)

  • Filter: (NOT deleted)
  • Rows Removed by Filter: 2440
7. 0.004 0.015 ↑ 1.0 1 1

Hash (cost=8.31..8.31 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.011 0.011 ↑ 1.0 1 1

Index Scan using dynamic_list_client_metadata_client_id_list_id_idx on dynamic_list_client_metadata dlcm (cost=0.29..8.31 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=1)

  • Index Cond: ((client_id = 1005) AND (list_id = 2))
9. 0.656 0.656 ↑ 1.0 1 164

Index Scan using pk_dynamic_column_metadata on dynamic_column_metadata dcm (cost=0.29..0.30 rows=1 width=100) (actual time=0.003..0.004 rows=1 loops=164)

  • Index Cond: (id = dlccm.list_column_id)
10. 0.492 0.492 ↑ 1.0 1 164

Index Scan using idx_entity_field_id_entityid on entity_field ef (cost=0.28..0.35 rows=1 width=25) (actual time=0.002..0.003 rows=1 loops=164)

  • Index Cond: (id = dcm.entity_field_id)
11. 2.774 7.269 ↓ 79.0 79 1

Nested Loop Left Join (cost=9.16..509.20 rows=1 width=167) (actual time=2.052..7.269 rows=79 loops=1)

12. 0.056 4.416 ↓ 79.0 79 1

Nested Loop Left Join (cost=8.88..507.89 rows=1 width=179) (actual time=1.847..4.416 rows=79 loops=1)

13. 0.166 4.360 ↓ 79.0 79 1

Nested Loop Left Join (cost=8.60..507.57 rows=1 width=159) (actual time=1.844..4.360 rows=79 loops=1)

  • Filter: CASE WHEN (dlccme.entity_field_id IS NOT NULL) THEN ef_1.active ELSE true END
  • Rows Removed by Filter: 20
14. 1.092 3.897 ↓ 99.0 99 1

Hash Join (cost=8.32..507.22 rows=1 width=120) (actual time=0.667..3.897 rows=99 loops=1)

  • Hash Cond: (dlccme.list_client_id = dlcm_1.id)
15. 2.772 2.772 ↑ 1.0 12,732 1

Seq Scan on dynamic_list_column_client_metadata_extended dlccme (cost=0.00..451.14 rows=12,732 width=124) (actual time=0.023..2.772 rows=12,732 loops=1)

  • Filter: (NOT deleted)
  • Rows Removed by Filter: 882
16. 0.004 0.033 ↑ 1.0 1 1

Hash (cost=8.31..8.31 rows=1 width=4) (actual time=0.033..0.033 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.029 0.029 ↑ 1.0 1 1

Index Scan using dynamic_list_client_metadata_client_id_list_id_idx on dynamic_list_client_metadata dlcm_1 (cost=0.29..8.31 rows=1 width=4) (actual time=0.028..0.029 rows=1 loops=1)

  • Index Cond: ((client_id = 1005) AND (list_id = 2))
18. 0.297 0.297 ↑ 1.0 1 99

Index Scan using idx_entity_field_id_entityid on entity_field ef_1 (cost=0.28..0.34 rows=1 width=44) (actual time=0.003..0.003 rows=1 loops=99)

  • Index Cond: (dlccme.entity_field_id = id)
19. 0.000 0.000 ↓ 0.0 0 79

Index Scan using entity_field_groups_pkey on entity_field_groups efg (cost=0.28..0.31 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=79)

  • Index Cond: (id = ef_1.layout_group_id)
20. 0.079 0.079 ↓ 0.0 0 79

Index Scan using pk_role_group on role_group rg (cost=0.28..0.30 rows=1 width=5) (actual time=0.001..0.001 rows=0 loops=79)

  • Index Cond: (dlccme.role_group_id = id)
Planning time : 1.250 ms
Execution time : 646.153 ms