explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FuDt : Optimization for: plan #R42z

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

HashAggregate (cost=199.45..201.27 rows=182 width=177) (actual time=21.333..21.333 rows=0 loops=1)

  • Group Key: tc_payments_paymenttransaction.id, tc_payments_paymenttransaction.created, tc_payments_paymenttransaction.modified, tc_payments_paymenttransaction.created_by_id, tc_payments_paymenttransaction.modified_by_id, tc_payments_paymenttransaction._extra, tc_payments_paymenttransaction.type, tc_payments_paymenttransaction.user_id, tc_payments_paymenttransaction.user_mode, tc_payments_paymenttransaction.payment_order_id, tc_payments_paymenttransaction.gateway_id, tc_payments_paymenttransaction.method_id, tc_payments_paymenttransaction.acquirer_id, tc_payments_paymenttransaction.value, tc_payments_paymenttransaction.success, tc_payments_paymenttransaction.delayed, tc_payments_paymenttransaction.currency_id, tc_payments_paymenttransaction.date, tc_payments_paymenttransaction.external_id, tc_payments_paymenttransaction.credit_card_type, tc_payments_paymenttransaction.withdrawal_extra_id, tc_payments_paymenttransaction.cause_content_type_id, tc_payments_paymenttransaction.cause_object_id, tc_payments_paymenttransaction.payment_state, tc_payments_paymenttransaction.tpi_state, tc_payments_paymenttransaction.security_check, tc_payments_paymenttransaction.is_blocked_to_tpi, tc_payments_paymenttransaction.referral_ids, tc_payments_paymenttransaction.pg_account_id, tc_payments_paymenttransaction.error_code, tc_payments_paymenttransaction.fraud_check_score, tc_payments_paymenttransaction.fraud_check_manual, tc_payments_paymenttransaction.fraud_check_result, tc_payments_paymenttransaction.historic_assigned_to_id, tc_payments_paymenttransaction.historic_sales_manager_id
2. 6.824 21.332 ↓ 0.0 0 1

Bitmap Heap Scan on tc_payments_paymenttransaction (cost=43.84..183.52 rows=182 width=177) (actual time=21.332..21.332 rows=0 loops=1)

  • Recheck Cond: ((tpi_state = 50) OR (payment_state = 10))
  • Filter: ((hashed SubPlan 1) AND (type = 1))
  • Rows Removed by Filter: 384
  • Heap Blocks: exact=100
3. 0.002 14.310 ↓ 0.0 0 1

BitmapOr (cost=35.54..35.54 rows=384 width=0) (actual time=14.310..14.310 rows=0 loops=1)

4. 14.178 14.178 ↑ 1.0 384 1

Bitmap Index Scan on tc_payments_paymenttransaction_df503b75 (cost=0.00..31.16 rows=384 width=0) (actual time=14.178..14.178 rows=384 loops=1)

  • Index Cond: (tpi_state = 50)
5. 0.130 0.130 ↓ 0.0 0 1

Bitmap Index Scan on tc_payments_paymenttransaction_09e22b19 (cost=0.00..4.29 rows=1 width=0) (actual time=0.130..0.130 rows=0 loops=1)

  • Index Cond: (payment_state = 10)
6.          

SubPlan (forBitmap Heap Scan)

7. 0.198 0.198 ↓ 0.0 0 1

Index Scan using tc_payments_paymentorder_wallet_content_type_id_w_0b9bd6c3_idx on tc_payments_paymentorder u0 (cost=0.28..8.30 rows=1 width=4) (actual time=0.198..0.198 rows=0 loops=1)

  • Index Cond: ((wallet_content_type_id = 67) AND (wallet_object_id = 1705289))
Planning time : 0.396 ms
Execution time : 21.447 ms