explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ebXe : slow

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

Sort (cost=3,468,731.57..3,468,731.58 rows=2 width=696) (actual rows= loops=)

  • Sort Key: account_state_1.account_state_id, product_state_1.product_state_id, asset_1.asset_id
2. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=2,550,620.68..3,468,731.56 rows=2 width=696) (actual rows= loops=)

  • Hash Cond: (member_state.member_state_id = (1365258))
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,550,620.65..3,455,997.78 rows=4,850,946 width=696) (actual rows= loops=)

  • Hash Cond: (account_state_1.account_state_id = account_extras_es_1.account_state_id)
4. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=2,550,601.65..3,437,780.83 rows=4,850,946 width=522) (actual rows= loops=)

  • Hash Cond: (product_state_1.account_state_id = account_state_1.account_state_id)
5. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=6.17..453,065.47 rows=4,850,946 width=153) (actual rows= loops=)

  • Merge Cond: (product_state_1.product_state_id = asset_1.product_state_id)
6. 0.000 0.000 ↓ 0.0

Index Scan using pk_product_state on product_state product_state_1 (cost=0.43..227,893.62 rows=4,850,946 width=129) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using ix_asset_product_state_id on asset asset_1 (cost=0.43..156,813.69 rows=4,843,423 width=24) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=2,378,048.96..2,378,048.96 rows=2,813,482 width=369) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,284,450.55..2,378,048.96 rows=2,813,482 width=369) (actual rows= loops=)

  • Hash Cond: (account_state_1.account_state_id = account_extras_tx_1.account_state_id)
10. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1,284,386.55..2,367,410.40 rows=2,813,482 width=363) (actual rows= loops=)

  • Hash Cond: (account_state_1.member_state_id = member_state.member_state_id)
11. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=133,569.35..964,895.11 rows=2,813,482 width=163) (actual rows= loops=)

  • Hash Cond: (address_2.address_id = account_state_1.billing_address_id)
12. 0.000 0.000 ↓ 0.0

Seq Scan on address address_2 (cost=0.00..399,830.89 rows=10,419,689 width=95) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash (cost=65,429.82..65,429.82 rows=2,813,482 width=68) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on account_state account_state_1 (cost=0.00..65,429.82 rows=2,813,482 width=68) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=1,042,847.36..1,042,847.36 rows=2,709,828 width=200) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=200,541.13..1,042,847.36 rows=2,709,828 width=200) (actual rows= loops=)

  • Hash Cond: (address_1.address_id = member_state.address_id)
17. 0.000 0.000 ↓ 0.0

Seq Scan on address address_1 (cost=0.00..399,830.89 rows=10,419,689 width=95) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=121,680.28..121,680.28 rows=2,709,828 width=105) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on member_state (cost=0.00..121,680.28 rows=2,709,828 width=105) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Hash (cost=34.00..34.00 rows=2,400 width=6) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on account_extras_tx account_extras_tx_1 (cost=0.00..34.00 rows=2,400 width=6) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=14.00..14.00 rows=400 width=174) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on account_extras_es account_extras_es_1 (cost=0.00..14.00 rows=400 width=174) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash (cost=0.02..0.02 rows=1 width=4) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

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