explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L4Yy

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=0.70..83,781.38 rows=1 width=1,587) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Index Scan using transactions_uniq_id_unique on transactions (cost=0.70..83,781.38 rows=1 width=1,587) (actual rows= loops=)

  • Index Cond: ((uniq_id)::text = 'tr_vV5TFN5GKCLlMeimqy4LEiWUhAF05tRx'::text)
3.          

SubPlan (forIndex Scan)

4. 0.000 0.000 ↓ 0.0

Index Scan using gateways_pkey on gateways (cost=42,100.42..42,108.44 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id = $2)
5.          

Initplan (forIndex Scan)

6. 0.000 0.000 ↓ 0.0

Limit (cost=42,092.26..42,100.28 rows=1 width=4) (actual rows= loops=)

7.          

Initplan (forLimit)

8. 0.000 0.000 ↓ 0.0

Limit (cost=0.58..42,091.98 rows=1 width=51) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan Backward using transaction_operations_pkey on transaction_operations (cost=0.58..431,984,093.13 rows=10,263 width=51) (actual rows= loops=)

  • Filter: ((gateway_configuration_uid IS NOT NULL) AND ((transaction_uid)::text = (transactions.uniq_id)::text))
10. 0.000 0.000 ↓ 0.0

Index Scan using gateway_configurations_uniq_id_key on gateway_configurations (cost=0.28..8.29 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((uniq_id)::text = ($1)::text)
11. 0.000 0.000 ↓ 0.0

Limit (cost=0.74..5.67 rows=1 width=8) (actual rows= loops=)

12.          

Initplan (forLimit)

13. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=32) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=178) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=8) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=8) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using transactions_fingerprint_created_at_index on transactions transactionstmp (cost=0.70..20.43 rows=4 width=8) (actual rows= loops=)

  • Index Cond: ((fingerprint = $4) AND (created_at >= $8) AND (created_at < ($9 + '1 mon'::interval)))
  • Filter: ((uniq_id)::text <> ($6)::text)
18. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=8) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using invoices_transaction_uid_index on invoices (cost=0.55..8.57 rows=1 width=36) (actual rows= loops=)

  • Index Cond: ((transaction_uid)::text = (transactions.uniq_id)::text)
20. 0.000 0.000 ↓ 0.0

Aggregate (cost=41,649.96..41,649.97 rows=1 width=32) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Index Scan using transaction_operations_transaction_uid_index on transaction_operations transaction_operations_1 (cost=0.70..41,624.30 rows=10,263 width=964) (actual rows= loops=)

  • Index Cond: ((transaction_uid)::text = (transactions.uniq_id)::text)