explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kc9N

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.534 ↑ 1.0 1 1

Result (cost=1,607.21..1,607.22 rows=1 width=1) (actual time=0.534..0.534 rows=1 loops=1)

2.          

Initplan (for Result)

3. 0.001 0.532 ↓ 0.0 0 1

Nested Loop Semi Join (cost=38.76..1,607.21 rows=1 width=0) (actual time=0.532..0.532 rows=0 loops=1)

  • Join Filter: (billing_document_attrs.owner_id = billing_document_attrs_2.owner_id)
4. 0.000 0.531 ↓ 0.0 0 1

Nested Loop Semi Join (cost=38.19..1,534.53 rows=1 width=12) (actual time=0.531..0.531 rows=0 loops=1)

5. 0.001 0.531 ↓ 0.0 0 1

Nested Loop (cost=9.81..201.95 rows=41 width=8) (actual time=0.531..0.531 rows=0 loops=1)

6. 0.000 0.530 ↓ 0.0 0 1

HashAggregate (cost=9.25..9.66 rows=41 width=4) (actual time=0.530..0.530 rows=0 loops=1)

  • Group Key: billing_document_attrs_1.owner_id
7. 0.530 0.530 ↓ 0.0 0 1

Index Only Scan using billing_document_attrs_value_datetime_owner_id_idx on billing_document_attrs billing_document_attrs_1 (cost=0.43..9.15 rows=41 width=4) (actual time=0.530..0.530 rows=0 loops=1)

  • Index Cond: (value_datetime = '2020-01-31 22:00:00+00'::timestamp with time zone)
  • Heap Fetches: 0
8. 0.000 0.000 ↓ 0.0 0

Index Only Scan using billing_document_pkey on billing_document (cost=0.56..4.68 rows=1 width=4) (never executed)

  • Index Cond: (id = billing_document_attrs_1.owner_id)
  • Heap Fetches: 0
9. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on billing_document_attrs (cost=28.38..32.39 rows=1 width=4) (never executed)

  • Recheck Cond: ((owner_id = billing_document.id) AND ((name)::text = 'crit_unique_company_id'::text) AND (value_int = 249,161))
10. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=28.38..28.38 rows=1 width=0) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ix_billing_document_attrs_owner_id (cost=0.00..11.19 rows=404 width=0) (never executed)

  • Index Cond: (owner_id = billing_document.id)
12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ix_billing_document_attrs_name_value_int (cost=0.00..16.83 rows=426 width=0) (never executed)

  • Index Cond: (((name)::text = 'crit_unique_company_id'::text) AND (value_int = 249,161))
13. 0.000 0.000 ↓ 0.0 0

Index Scan using ix_billing_document_attrs_owner_id on billing_document_attrs billing_document_attrs_2 (cost=0.57..36.62 rows=1 width=4) (never executed)

  • Index Cond: (owner_id = billing_document.id)
  • Filter: (((name)::text = 'crit_unique_source'::text) AND ((value_str)::text = 'prom'::text))
Planning time : 18.475 ms
Execution time : 0.614 ms