explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d69a

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

HashAggregate (cost=205,536.09..252,070.50 rows=8 width=96) (actual rows= loops=)

  • Group Key: x.purse_type, x.purse_value
2.          

CTE tbl1

3. 0.000 0.000 ↓ 0.0

Index Scan using ind_admin_billing_3 on obj_billing b (cost=0.29..10.52 rows=8 width=87) (actual rows= loops=)

  • Filter: ((create_date)::double precision >= date_part('epoch'::text, '2019-07-01 00:00:00+03'::timestamp with time zone))
4.          

CTE tbl2

5. 0.000 0.000 ↓ 0.0

Seq Scan on obj_links_crowd (cost=0.00..199,871.29 rows=232,183 width=8) (actual rows= loops=)

  • Filter: ((date_change_status >= '2019-07-01 00:00:00'::timestamp without time zone) AND ((status)::text = 'billed'::text))
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=0.63..5,607.85 rows=9,287 width=96) (actual rows= loops=)

  • Hash Cond: (tbl2.id_user = x.id_user)
7. 0.000 0.000 ↓ 0.0

CTE Scan on tbl2 (cost=0.00..4,643.66 rows=232,183 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=0.53..0.53 rows=8 width=112) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Join (cost=0.26..0.53 rows=8 width=112) (actual rows= loops=)

  • Hash Cond: (x.id_user = tbl1.id_user)
10. 0.000 0.000 ↓ 0.0

CTE Scan on tbl1 x (cost=0.00..0.16 rows=8 width=104) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=0.16..0.16 rows=8 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

CTE Scan on tbl1 (cost=0.00..0.16 rows=8 width=8) (actual rows= loops=)

13.          

SubPlan (for HashAggregate)

14. 0.000 0.000 ↓ 0.0

Aggregate (cost=0.18..0.19 rows=1 width=8) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

CTE Scan on tbl1 tbl1_1 (cost=0.00..0.18 rows=1 width=8) (actual rows= loops=)

  • Filter: ((purse_value)::text = (x.purse_value)::text)
16. 0.000 0.000 ↓ 0.0

Aggregate (cost=0.18..0.20 rows=1 width=20) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

CTE Scan on tbl1 tbl1_2 (cost=0.00..0.18 rows=1 width=20) (actual rows= loops=)

  • Filter: ((purse_value)::text = (x.purse_value)::text)
18. 0.000 0.000 ↓ 0.0

Aggregate (cost=5,816.39..5,816.40 rows=1 width=0) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash Join (cost=0.21..5,526.16 rows=116,092 width=0) (actual rows= loops=)

  • Hash Cond: (tbl2_1.id_user = tbl1_3.id_user)
20. 0.000 0.000 ↓ 0.0

CTE Scan on tbl2 tbl2_1 (cost=0.00..4,643.66 rows=232,183 width=8) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=0.19..0.19 rows=1 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

HashAggregate (cost=0.18..0.19 rows=1 width=8) (actual rows= loops=)

  • Group Key: tbl1_3.id_user
23. 0.000 0.000 ↓ 0.0

CTE Scan on tbl1 tbl1_3 (cost=0.00..0.18 rows=1 width=8) (actual rows= loops=)

  • Filter: ((purse_value)::text = (x.purse_value)::text)