explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 88uh

Settings
# exclusive inclusive rows x rows loops node
1. 7.813 187.778 ↓ 1.3 2,368 1

Nested Loop (cost=17,610.57..46,990.82 rows=1,794 width=222) (actual time=0.807..187.778 rows=2,368 loops=1)

2.          

CTE investors

3. 42.624 192.577 ↓ 1.0 22,823 1

Gather (cost=1,000.09..17,610.53 rows=21,875 width=40) (actual time=0.509..192.577 rows=22,823 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 8.608 149.953 ↑ 1.1 11,412 2 / 2

Nested Loop (cost=0.09..14,423.03 rows=12,868 width=40) (actual time=0.119..149.953 rows=11,412 loops=2)

5. 15.818 15.818 ↑ 1.1 11,412 2 / 2

Parallel Index Scan using tb_tm_investor_billing_plan_id_plan_idx on tb_tm_investor_billing_plan (cost=0.04..378.66 rows=12,868 width=8) (actual time=0.041..15.818 rows=11,412 loops=2)

  • Index Cond: (id_plan = 16)
6. 125.526 125.526 ↑ 1.0 1 22,823 / 2

Index Scan using tb_investor_pk on tb_investor (cost=0.04..1.09 rows=1 width=28) (actual time=0.011..0.011 rows=1 loops=22,823)

  • Index Cond: (id_investor = tb_tm_investor_billing_plan.id_investor)
7. 134.315 134.315 ↓ 1.0 22,823 1

CTE Scan on investors (cost=0.00..43.75 rows=21,875 width=40) (actual time=0.511..134.315 rows=22,823 loops=1)

8. 45.646 45.646 ↓ 0.0 0 22,823

Index Scan using tb_push_investor_device_application_master_pk on tb_push_investor_device_application_master push (cost=0.04..1.17 rows=1 width=162) (actual time=0.002..0.002 rows=0 loops=22,823)

  • Index Cond: ((id_lote = 1) AND (id_investor = investors.id_investor))
9.          

SubPlan (for Nested Loop)

10. 0.004 0.004 ↑ 1.0 1 1

Index Scan using tb_investor_pk on tb_investor tb_investor_1 (cost=0.04..2.04 rows=1 width=24) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (id_investor = investors.id_investor)
Planning time : 0.484 ms
Execution time : 252.208 ms