explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pCFr

Settings
# exclusive inclusive rows x rows loops node
1. 0.383 0.878 ↓ 119.0 119 1

Nested Loop (cost=1.14..49.84 rows=1 width=92) (actual time=0.040..0.878 rows=119 loops=1)

2. 0.182 0.495 ↓ 334.7 1,004 1

Nested Loop (cost=0.84..48.82 rows=3 width=60) (actual time=0.030..0.495 rows=1,004 loops=1)

3. 0.008 0.008 ↑ 1.0 1 1

Index Scan using rappi_credits_application_user_id_index on rappi_credits (cost=0.42..8.44 rows=1 width=5) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (application_user_id = 131459676)
4. 0.305 0.305 ↓ 111.6 1,004 1

Index Scan using rappi_credit_transactions_rappi_credit_id_state_starts_at_index on rappi_credit_transactions (cost=0.42..40.29 rows=9 width=59) (actual time=0.021..0.305 rows=1,004 loops=1)

  • Index Cond: ((rappi_credit_id = rappi_credits.id) AND ((state)::text = 'paid'::text) AND (COALESCE(starts_at, '1900-01-01 00:00:00'::timestamp without time zone) < '2019-06-06 18:00:29.089703'::timestamp without time zone))
5. 0.000 0.000 ↓ 0.0 0 1,004

Index Scan using rappi_credit_restrictions_pkey on rappi_credit_restrictions (cost=0.29..0.33 rows=1 width=12) (actual time=0.000..0.000 rows=0 loops=1,004)

  • Index Cond: (id = rappi_credit_transactions.rappi_credit_restriction_id)
  • Filter: ((starts_at < '2019-06-06 18:00:29.089703'::timestamp without time zone) AND (ends_at > '2019-06-06 18:00:29.089703'::timestamp without time zone) AND ((COALESCE(rappi_credit_transactions.ends_at, ends_at) IS NULL) OR (COALESCE(rappi_credit_transactions.ends_at, ends_at) > '2019-06-06 18:00:29.089703'::timestamp without time zone)))
  • Rows Removed by Filter: 0
Planning time : 0.386 ms
Execution time : 0.927 ms