explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nwyu

Settings
# exclusive inclusive rows x rows loops node
1. 44.221 44.221 ↓ 13,959.0 13,959 1

CTE Scan on debited_transactions (cost=7.96..7.98 rows=1 width=12) (actual time=36.437..44.221 rows=13,959 loops=1)

2.          

CTE debited_transactions

3. 3.468 40.913 ↓ 13,959.0 13,959 1

GroupAggregate (cost=7.94..7.96 rows=1 width=16) (actual time=36.436..40.913 rows=13,959 loops=1)

  • Group Key: rcdo.rappi_credit_paid_transaction_id
4. 4.551 37.445 ↓ 15,938.0 15,938 1

Sort (cost=7.94..7.95 rows=1 width=12) (actual time=36.428..37.445 rows=15,938 loops=1)

  • Sort Key: rcdo.rappi_credit_paid_transaction_id
  • Sort Method: quicksort Memory: 1132kB
5. 9.643 32.894 ↓ 15,938.0 15,938 1

Nested Loop (cost=1.45..7.93 rows=1 width=12) (actual time=0.035..32.894 rows=15,938 loops=1)

6. 1.627 7.284 ↓ 15,967.0 15,967 1

Nested Loop (cost=1.01..7.45 rows=1 width=12) (actual time=0.028..7.284 rows=15,967 loops=1)

7. 0.009 0.009 ↑ 1.0 1 1

Index Scan using rappi_credits_application_user_id_index_dba_20191006 on rappi_credits rc (cost=0.43..2.65 rows=1 width=4) (actual time=0.007..0.009 rows=1 loops=1)

  • Index Cond: (application_user_id = '307984336'::bigint)
8. 5.648 5.648 ↓ 5,322.3 15,967 1

Index Scan using rappi_credit_transactions_rappi_credit_id_state_dba on rappi_credit_transactions rct (cost=0.57..4.77 rows=3 width=16) (actual time=0.019..5.648 rows=15,967 loops=1)

  • Index Cond: ((rappi_credit_id = rc.id) AND ((state)::text = 'debited'::text))
  • Filter: (order_id <> 58529974)
9. 15.967 15.967 ↑ 1.0 1 15,967

Index Scan using rappi_credit_debit_origins_rappi_credit_debit_transaction_id_in on rappi_credit_debit_origins rcdo (cost=0.44..0.47 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=15,967)

  • Index Cond: (rappi_credit_debit_transaction_id = rct.id)
Planning time : 0.395 ms
Execution time : 44.961 ms