explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fXQg

Settings
# exclusive inclusive rows x rows loops node
1. 41.391 269.475 ↓ 2.2 1,274 1

Hash Join (cost=5,578.77..38,107.58 rows=582 width=92) (actual time=45.749..269.475 rows=1,274 loops=1)

  • Hash Cond: (rappi_credit_transactions.rappi_credit_id = rappi_credits.id)
  • Join Filter: ((((rappi_credit_transactions.state)::text = 'paid'::text) AND (rappi_credits.application_user_id = 131459676) AND ((rappi_credit_transactions.starts_at IS NULL) OR (rappi_credit_transactions.ends_at IS NULL))) OR ((rappi_credit_transactions.starts_at < '2019-06-06 11:45:03.494554'::timestamp without time zone) AND (rappi_credit_transactions.ends_at > '2019-06-06 11:45:03.494554'::timestamp without time zone)))
  • Rows Removed by Join Filter: 65148
2. 183.033 183.033 ↑ 1.9 66,422 1

Seq Scan on rappi_credit_transactions (cost=0.00..26,192.53 rows=123,675 width=59) (actual time=0.008..183.033 rows=66,422 loops=1)

  • Filter: ((((state)::text = 'paid'::text) AND ((starts_at IS NULL) OR (ends_at IS NULL))) OR ((starts_at < '2019-06-06 11:45:03.494554'::timestamp without time zone) AND (ends_at > '2019-06-06 11:45:03.494554'::timestamp without time zone)))
  • Rows Removed by Filter: 793437
3. 25.806 45.051 ↑ 1.0 151,723 1

Hash (cost=2,941.23..2,941.23 rows=151,723 width=13) (actual time=45.051..45.051 rows=151,723 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2809kB
4. 19.245 19.245 ↑ 1.0 151,723 1

Seq Scan on rappi_credits (cost=0.00..2,941.23 rows=151,723 width=13) (actual time=0.003..19.245 rows=151,723 loops=1)

Planning time : 0.242 ms
Execution time : 269.586 ms