explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2sKw : Select

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

Nested Loop Left Join (cost=57,368.91..70,844.64 rows=3 width=305) (actual rows= loops=)

  • Join Filter: (dg.dealerpj_id = p.dealer_id)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=57,368.63..70,843.09 rows=3 width=325) (actual rows= loops=)

  • Hash Cond: (p.provider_id = provider.id)
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=57,367.02..70,841.48 rows=3 width=305) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=57,366.60..70,833.55 rows=3 width=290) (actual rows= loops=)

  • Join Filter: (dealer.id = p.dealer_id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=57,366.31..70,830.99 rows=3 width=273) (actual rows= loops=)

  • Hash Cond: (p.id = pi.proposal_id)
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=51,259.85..64,724.53 rows=3 width=201) (actual rows= loops=)

  • Hash Cond: (p.id = pv.proposal_id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on proposal p (cost=0.00..13,464.67 rows=3 width=121) (actual rows= loops=)

  • Filter: ((dealer_id = 18,998) AND (((date(createdat) >= (now() - '60 days'::interval)) AND (date(createdat) <= now())) OR ((date(updatedat) >= (now() - '60 days'::interval)) AND (date(updatedat) <= now()))))
8. 0.000 0.000 ↓ 0.0

Hash (cost=51,201.34..51,201.34 rows=4,681 width=88) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Subquery Scan on pv (cost=50,897.00..51,201.34 rows=4,681 width=88) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=50,897.00..51,154.53 rows=4,681 width=88) (actual rows= loops=)

  • Group Key: pv_1.proposal_id
11. 0.000 0.000 ↓ 0.0

Sort (cost=50,897.00..50,908.71 rows=4,683 width=66) (actual rows= loops=)

  • Sort Key: pv_1.proposal_id
12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..50,611.50 rows=4,683 width=66) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on proposalvehicle pv_1 (cost=0.00..44,328.79 rows=4,683 width=66) (actual rows= loops=)

  • Filter: ((date(date) <= now()) AND (date(date) >= (now() - '60 days'::interval)))
14. 0.000 0.000 ↓ 0.0

Index Only Scan using proposal_pk on proposal p_1 (cost=0.42..1.34 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = pv_1.proposal_id)
15. 0.000 0.000 ↓ 0.0

Hash (cost=6,078.33..6,078.33 rows=2,250 width=80) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Subquery Scan on pi (cost=5,909.06..6,078.33 rows=2,250 width=80) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=5,909.06..6,055.83 rows=2,250 width=80) (actual rows= loops=)

  • Group Key: pi_1.proposal_id
18. 0.000 0.000 ↓ 0.0

Sort (cost=5,909.06..5,914.71 rows=2,261 width=128) (actual rows= loops=)

  • Sort Key: pi_1.proposal_id
19. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=32.23..5,783.09 rows=2,261 width=128) (actual rows= loops=)

  • Hash Cond: (pi_1.provider_id = pd.id)
20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=30.63..5,774.75 rows=2,261 width=108) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on proposalinteractions pi_1 (cost=30.21..2,234.67 rows=2,261 width=108) (actual rows= loops=)

  • Recheck Cond: ((date(date) >= (now() - '60 days'::interval)) AND (date(date) <= now()))
22. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_proposalinteractionsv2_date (cost=0.00..29.64 rows=2,261 width=0) (actual rows= loops=)

  • Index Cond: ((date(date) >= (now() - '60 days'::interval)) AND (date(date) <= now()))
23. 0.000 0.000 ↓ 0.0

Index Only Scan using proposal_pk on proposal p_2 (cost=0.42..1.57 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = pi_1.proposal_id)
24. 0.000 0.000 ↓ 0.0

Hash (cost=1.27..1.27 rows=27 width=28) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on provider pd (cost=0.00..1.27 rows=27 width=28) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Materialize (cost=0.29..2.51 rows=1 width=25) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Index Scan using dealer_pkey on dealer (cost=0.29..2.51 rows=1 width=25) (actual rows= loops=)

  • Index Cond: (id = 18,998)
28. 0.000 0.000 ↓ 0.0

Index Scan using usersite_pkey on usersite u (cost=0.42..2.64 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (p.seller_id = id)
29. 0.000 0.000 ↓ 0.0

Hash (cost=1.27..1.27 rows=27 width=28) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Seq Scan on provider (cost=0.00..1.27 rows=27 width=28) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Materialize (cost=0.28..1.41 rows=1 width=8) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Index Only Scan using dealerpj_x_dealergroup_pkey on dealerpj_x_dealergroup dg (cost=0.28..1.40 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (dealerpj_id = 18,998)