explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0PnZ

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

HashAggregate (cost=1,276.69..1,277.76 rows=1 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.59 rows=1 width=87) (actual rows= loops=)

  • Filter: (((purse_value)::text = '+380634279297'::text) AND ((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

Index Scan using ind_interface_crowd_status on obj_links_crowd (cost=0.43..1,265.05 rows=41 width=8) (actual rows= loops=)

  • Index Cond: ((id_user = ANY ('{42549,281686}'::bigint[])) AND ((status)::text = 'billed'::text))
  • Filter: (date_change_status >= '2019-07-01 00:00:00'::timestamp without time zone)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.03..1.05 rows=1 width=96) (actual rows= loops=)

  • Join Filter: (x.id_user = tbl1.id_user)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=0.03..1.02 rows=1 width=112) (actual rows= loops=)

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

CTE Scan on tbl2 (cost=0.00..0.82 rows=41 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

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

10. 0.000 0.000 ↓ 0.0

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

11. 0.000 0.000 ↓ 0.0

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

12.          

SubPlan (for HashAggregate)

13. 0.000 0.000 ↓ 0.0

Aggregate (cost=0.02..0.03 rows=1 width=8) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

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

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

Aggregate (cost=0.03..0.04 rows=1 width=20) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

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

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

Aggregate (cost=0.98..0.99 rows=1 width=0) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=0.04..0.97 rows=1 width=0) (actual rows= loops=)

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

CTE Scan on tbl2 tbl2_1 (cost=0.00..0.82 rows=41 width=8) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

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

21. 0.000 0.000 ↓ 0.0

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

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