explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vySh

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.012 ↓ 0.0 0 1

Nested Loop (cost=12.64..28.16 rows=1 width=216) (actual time=0.011..0.012 rows=0 loops=1)

  • Join Filter: ((((user_defined_metadata_metadata.value)::text = 'foo'::text) AND (user_defined_metadata_schemas.company_entity_id = 1) AND ((user_defined_metadata_schema_definitions.label)::text = 'key1'::text)) OR (((user_defined_metadata_metadata.value)::text = 'bar'::text) AND (user_defined_metadata_schemas.company_entity_id = 2) AND ((user_defined_metadata_schema_definitions.label)::text = 'key2'::text)))
2. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=12.49..23.64 rows=1 width=152) (actual time=0.010..0.011 rows=0 loops=1)

3. 0.003 0.010 ↓ 0.0 0 1

Bitmap Heap Scan on user_defined_metadata_schemas (cost=8.32..12.34 rows=1 width=60) (actual time=0.009..0.010 rows=0 loops=1)

  • Recheck Cond: ((((resource_type)::text = 'Shipments'::text) AND (company_entity_id = 1)) OR (((resource_type)::text = 'Shipments'::text) AND (company_entity_id = 2)))
4. 0.001 0.007 ↓ 0.0 0 1

BitmapOr (cost=8.32..8.32 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=1)

5. 0.005 0.005 ↓ 0.0 0 1

Bitmap Index Scan on index_udm_schemas_on_resource_type_and_company_entity_id (cost=0.00..4.16 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (((resource_type)::text = 'Shipments'::text) AND (company_entity_id = 1))
6. 0.001 0.001 ↓ 0.0 0 1

Bitmap Index Scan on index_udm_schemas_on_resource_type_and_company_entity_id (cost=0.00..4.16 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (((resource_type)::text = 'Shipments'::text) AND (company_entity_id = 2))
7. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on user_defined_metadata_schema_definitions (cost=4.17..11.30 rows=1 width=92) (never executed)

  • Recheck Cond: (user_defined_metadata_schema_id = user_defined_metadata_schemas.id)
  • Filter: (((label)::text = 'key1'::text) OR ((label)::text = 'key2'::text))
8. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on index_udm_schema_definitions_on_udm_schema_id_and_label (cost=0.00..4.17 rows=3 width=0) (never executed)

  • Index Cond: (user_defined_metadata_schema_id = user_defined_metadata_schemas.id)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using index_udm_metadata_on_udm_schema_definition_id_and_resource_id on user_defined_metadata_metadata (cost=0.15..4.50 rows=1 width=64) (never executed)

  • Index Cond: ((user_defined_metadata_schema_definition_id = user_defined_metadata_schema_definitions.id) AND (resource_id = ANY ('{1,2,3}'::integer[])))
  • Filter: (((value)::text = 'foo'::text) OR ((value)::text = 'bar'::text))
Planning time : 0.387 ms
Execution time : 0.086 ms