explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xPRh

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.125 ↓ 0.0 0 1

Nested Loop (cost=703.62..964.53 rows=22 width=8) (actual time=0.125..0.125 rows=0 loops=1)

2. 0.002 0.123 ↓ 0.0 0 1

Nested Loop (cost=703.33..953.11 rows=31 width=16) (actual time=0.123..0.123 rows=0 loops=1)

3. 0.003 0.121 ↓ 0.0 0 1

Unique (cost=703.03..703.19 rows=31 width=32) (actual time=0.121..0.121 rows=0 loops=1)

4. 0.049 0.118 ↓ 0.0 0 1

Sort (cost=703.03..703.11 rows=31 width=32) (actual time=0.118..0.118 rows=0 loops=1)

  • Sort Key: (COALESCE(expanded_entity.entity_id, original_entity.entity_id))
  • Sort Method: quicksort Memory: 25kB
5. 0.003 0.069 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.37..702.27 rows=31 width=32) (actual time=0.069..0.069 rows=0 loops=1)

6. 0.002 0.066 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.08..688.25 rows=31 width=16) (actual time=0.066..0.066 rows=0 loops=1)

  • Join Filter: ((ld_compound_unlink.virtual_compound_id IS NULL) AND (original_source.alternate_id = 'pri'::text))
7. 0.002 0.064 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.50..664.36 rows=31 width=43) (actual time=0.064..0.064 rows=0 loops=1)

8. 0.002 0.062 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.35..659.03 rows=31 width=43) (actual time=0.062..0.062 rows=0 loops=1)

  • Join Filter: (original_compound.data_source_id = original_source.id)
9. 0.003 0.060 ↓ 0.0 0 1

Nested Loop (cost=2.35..656.40 rows=31 width=32) (actual time=0.060..0.060 rows=0 loops=1)

10. 0.006 0.057 ↓ 0.0 0 1

Nested Loop (cost=2.06..610.27 rows=101 width=24) (actual time=0.057..0.057 rows=0 loops=1)

11. 0.010 0.022 ↑ 100.0 1 1

HashAggregate (cost=1.77..2.77 rows=100 width=4) (actual time=0.021..0.022 rows=1 loops=1)

  • Group Key: unnest('{21167}'::integer[])
12. 0.009 0.012 ↑ 100.0 1 1

ProjectSet (cost=0.00..0.52 rows=100 width=4) (actual time=0.008..0.012 rows=1 loops=1)

13. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.002..0.003 rows=1 loops=1)

14. 0.029 0.029 ↓ 0.0 0 1

Index Scan using syn_compound_jchem_structure_id_idx on syn_compound original_compound (cost=0.29..6.06 rows=1 width=32) (actual time=0.029..0.029 rows=0 loops=1)

  • Index Cond: (jchem_structure_id = (unnest('{21167}'::integer[])))
15. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ld_entity on ld_entity original_entity (cost=0.29..0.46 rows=1 width=16) (never executed)

  • Index Cond: (id = original_compound.id)
  • Filter: ((entity_type <> 'SAMPLE'::text) AND (archived = 0))
16. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.06 rows=4 width=19) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on ld_data_source original_source (cost=0.00..1.04 rows=4 width=19) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using ld_compound_unlink_virtual_compound_id_key on ld_compound_unlink (cost=0.15..0.17 rows=1 width=8) (never executed)

  • Index Cond: (virtual_compound_id = original_compound.id)
  • Heap Fetches: 0
19. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=0.58..0.76 rows=1 width=24) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Index Scan using canonical_structure_id_index on syn_compound expanded_compound (cost=0.29..0.40 rows=1 width=24) (never executed)

  • Index Cond: (original_compound.canonical_structure_id = canonical_structure_id)
  • Filter: ((archived = 0) AND (reactant = 0) AND (original_compound.data_source_id <> data_source_id))
21. 0.000 0.000 ↓ 0.0 0

Index Only Scan using entities_projects_unq on ld_entities_projects ld_entities_projects_1 (cost=0.29..0.37 rows=2 width=8) (never executed)

  • Index Cond: (entity_id = expanded_compound.id)
  • Filter: (project_id = ANY ('{0,1,2,3}'::bigint[]))
  • Heap Fetches: 0
22. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ld_entity on ld_entity expanded_entity (cost=0.29..0.45 rows=1 width=16) (never executed)

  • Index Cond: (id = expanded_compound.id)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using ld_entity_entity_id_key on ld_entity (cost=0.29..8.05 rows=1 width=16) (never executed)

  • Index Cond: (entity_id = (COALESCE(expanded_entity.entity_id, original_entity.entity_id)))
24. 0.000 0.000 ↓ 0.0 0

Index Only Scan using entities_projects_unq on ld_entities_projects (cost=0.29..0.35 rows=2 width=8) (never executed)

  • Index Cond: (entity_id = ld_entity.id)
  • Filter: (project_id = ANY ('{0,1,2,3,4}'::bigint[]))
  • Heap Fetches: 0