explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EeOK

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

Limit (cost=55.59..55.60 rows=1 width=16) (actual time=0.056..0.056 rows=0 loops=1)

2. 0.022 0.055 ↓ 0.0 0 1

Sort (cost=55.59..55.60 rows=1 width=16) (actual time=0.055..0.055 rows=0 loops=1)

  • Sort Key: subscription_log.created_at
  • Sort Method: quicksort Memory: 25kB
3. 0.000 0.033 ↓ 0.0 0 1

WindowAgg (cost=55.56..55.58 rows=1 width=16) (actual time=0.033..0.033 rows=0 loops=1)

4. 0.002 0.033 ↓ 0.0 0 1

HashAggregate (cost=55.56..55.57 rows=1 width=16) (actual time=0.033..0.033 rows=0 loops=1)

  • Group Key: subscription_log.id
5. 0.000 0.031 ↓ 0.0 0 1

Nested Loop (cost=47.56..55.56 rows=1 width=16) (actual time=0.031..0.031 rows=0 loops=1)

6. 0.001 0.031 ↓ 0.0 0 1

HashAggregate (cost=46.99..47.00 rows=1 width=8) (actual time=0.031..0.031 rows=0 loops=1)

  • Group Key: subscription_log_1.id
7. 0.001 0.030 ↓ 0.0 0 1

Nested Loop (cost=1.12..46.99 rows=1 width=8) (actual time=0.030..0.030 rows=0 loops=1)

8. 0.029 0.029 ↓ 0.0 0 1

Index Scan using subscription_source_idx on subscription (cost=0.56..5.04 rows=1 width=8) (actual time=0.029..0.029 rows=0 loops=1)

  • Index Cond: (source = 0)
  • Filter: ((status = ANY ('{3,5}'::integer[])) AND (store_id = 1582128870))
9. 0.000 0.000 ↓ 0.0 0

Index Scan using sub_log_subscription_idx on subscription_log subscription_log_1 (cost=0.56..41.94 rows=1 width=16) (never executed)

  • Index Cond: (subscription_id = subscription.id)
  • Filter: ((created_at >= '2019-04-01 00:00:00'::timestamp without time zone) AND (created_at < '2019-04-15 00:00:00'::timestamp without time zone) AND (log_type = ANY ('{5,6,23}'::integer[])))
10. 0.000 0.000 ↓ 0.0 0

Index Scan using subscription_log_pkey on subscription_log (cost=0.56..8.54 rows=1 width=16) (never executed)

  • Index Cond: (id = subscription_log_1.id)