explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dv46

Settings
# exclusive inclusive rows x rows loops node
1. 0.512 1.112 ↓ 986.0 986 1

Nested Loop Left Join (cost=5.26..80.39 rows=1 width=92) (actual time=0.164..1.112 rows=986 loops=1)

  • Filter: (((rappi_credit_restrictions.ends_at IS NULL) OR (rappi_credit_restrictions.ends_at > now())) AND ((rappi_credit_restrictions.starts_at IS NULL) OR (rappi_credit_restrictions.starts_at < now())) AND ((rappi_credit_restrictions.ends_at IS NULL) OR (rappi_credit_restrictions.ends_at > now())))
  • Rows Removed by Filter: 18
2. 0.131 0.600 ↓ 334.7 1,004 1

Nested Loop (cost=4.97..79.35 rows=3 width=60) (actual time=0.163..0.600 rows=1,004 loops=1)

3. 0.024 0.024 ↑ 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.023..0.024 rows=1 loops=1)

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

Bitmap Heap Scan on rappi_credit_transactions (cost=4.55..70.82 rows=9 width=59) (actual time=0.137..0.445 rows=1,004 loops=1)

  • Recheck Cond: (rappi_credit_id = rappi_credits.id)
  • Filter: ((state)::text = 'paid'::text)
  • Rows Removed by Filter: 621
  • Heap Blocks: exact=89
5. 0.098 0.098 ↓ 95.6 1,625 1

Bitmap Index Scan on rappi_credit_transactions_rappi_credit_id_index (cost=0.00..4.55 rows=17 width=0) (actual time=0.097..0.098 rows=1,625 loops=1)

  • Index Cond: (rappi_credit_id = rappi_credits.id)
6. 0.000 0.000 ↓ 0.0 0 1,004

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

  • Index Cond: (id = rappi_credit_transactions.rappi_credit_restriction_id)
Planning time : 1.341 ms
Execution time : 1.261 ms