explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jAp4

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

Nested Loop (cost=51,892.84..64,673.24 rows=1 width=774) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=51,892.42..52,507.98 rows=4 width=767) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=51,892.13..52,506.70 rows=4 width=759) (actual rows= loops=)

  • Hash Cond: ((tp1.client_id = usr.id) AND (tp1.venture_id = usr.venture_id))
4. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_net_wld_top1 tp1 (cost=0.00..494.32 rows=16,032 width=142) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=51,892.07..51,892.07 rows=4 width=623) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=50,831.26..51,892.07 rows=4 width=623) (actual rows= loops=)

  • Hash Cond: ((usr.id = tp5.client_id) AND (usr.venture_id = tp5.venture_id))
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=50,763.06..51,822.35 rows=4 width=487) (actual rows= loops=)

  • Hash Cond: ((usr.id = tp4.client_id) AND (usr.venture_id = tp4.venture_id))
8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=50,670.66..51,727.90 rows=4 width=351) (actual rows= loops=)

  • Hash Cond: ((usr.id = tp3.client_id) AND (usr.venture_id = tp3.venture_id))
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=50,532.06..51,586.25 rows=4 width=215) (actual rows= loops=)

  • Hash Cond: ((usr.id = tp2.client_id) AND (usr.venture_id = tp2.venture_id))
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=50,305.46..51,354.68 rows=4 width=79) (actual rows= loops=)

  • Hash Cond: ((ld.venture_id = usr.venture_id) AND (ld.client_id = usr.id))
11. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_net_wld_ld5 ld (cost=0.00..149.59 rows=9,659 width=14) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=48,694.56..48,694.56 rows=60,260 width=65) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on users usr (cost=1,579.97..48,694.56 rows=60,260 width=65) (actual rows= loops=)

  • Recheck Cond: ((venture_id = ANY ('{4840,6080,3600}'::integer[])) AND (link_id IS NOT NULL))
  • Filter: (active IS TRUE)
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on users_venture_id_link_id_idx (cost=0.00..1,564.90 rows=61,962 width=0) (actual rows= loops=)

  • Index Cond: ((venture_id = ANY ('{4840,6080,3600}'::integer[])) AND (link_id IS NOT NULL))
15. 0.000 0.000 ↓ 0.0

Hash (cost=152.44..152.44 rows=4,944 width=142) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_net_wld_top2 tp2 (cost=0.00..152.44 rows=4,944 width=142) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=93.24..93.24 rows=3,024 width=142) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_net_wld_top3 tp3 (cost=0.00..93.24 rows=3,024 width=142) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash (cost=62.16..62.16 rows=2,016 width=142) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_net_wld_top4 tp4 (cost=0.00..62.16 rows=2,016 width=142) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=45.88..45.88 rows=1,488 width=142) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on tmp_net_wld_top5 tp5 (cost=0.00..45.88 rows=1,488 width=142) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using tmp_net_wld_top_venture_id_client_id_idx on tmp_net_wld_top tp (cost=0.29..0.31 rows=1 width=14) (actual rows= loops=)

  • Index Cond: ((venture_id = usr.venture_id) AND (usr.id = client_id))
24. 0.000 0.000 ↓ 0.0

Index Scan using netcore_users_venture_id_mobile_idx on netcore_users nusr (cost=0.42..3,041.30 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (venture_id = usr.venture_id)
  • Filter: (((user_type)::text = 'agent'::text) AND (usr.id = user_id))