explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Oa55

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

CTE Scan on inters_talhao (cost=231,649,595.76..326,829,001.32 rows=349,282,222 width=69) (actual rows= loops=)

  • Filter: ((area_metro_inters > '0'::double precision) AND ((('100'::double precision * area_metro_inters) / area_kijo) > '5'::double precision))
2.          

CTE kijo_geom

3. 0.000 0.000 ↓ 0.0

Result (cost=0.43..535,733.33 rows=15,717,700 width=55) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.43..299,967.83 rows=15,717,700 width=54) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Append (cost=0.43..220,200.50 rows=157,177 width=233) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Scan using ddnmp_c4_20190_cd_cliente_cd_id_equipamento_dt_hr_utc_inici_idx on ddnmp_c4_20190 m (cost=0.43..217,842.85 rows=157,177 width=233) (actual rows= loops=)

  • Index Cond: ((cd_cliente = 4) AND (dt_hr_utc_inicial >= '2019-03-01 03:00:00'::timestamp without time zone) AND (dt_hr_utc_inicial <= '2019-03-02 02:59:59'::timestamp without time zone))
7.          

CTE kijo_union

8. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=2,539,209.93..3,144,341.38 rows=3,143,540 width=69) (actual rows= loops=)

  • Group Key: kijo_geom.cd_id, kijo_geom.cd_cliente, kijo_geom.dt_hr_local_inicial, kijo_geom.cd_estado, kijo_geom.secao_ativa
9. 0.000 0.000 ↓ 0.0

Sort (cost=2,539,209.93..2,578,504.18 rows=15,717,700 width=61) (actual rows= loops=)

  • Sort Key: kijo_geom.cd_id, kijo_geom.cd_cliente, kijo_geom.dt_hr_local_inicial, kijo_geom.cd_estado, kijo_geom.secao_ativa
10. 0.000 0.000 ↓ 0.0

CTE Scan on kijo_geom (cost=0.00..314,354.00 rows=15,717,700 width=61) (actual rows= loops=)

11.          

CTE talhao_kijo

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.25..62,933,671.05 rows=3,143,540,000 width=105) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

CTE Scan on kijo_union k (cost=0.00..62,870.80 rows=3,143,540 width=69) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Function Scan on fnc_field_referece t (cost=0.25..10.25 rows=1,000 width=36) (actual rows= loops=)

15.          

CTE inters_talhao

16. 0.000 0.000 ↓ 0.0

CTE Scan on talhao_kijo tk (cost=0.00..165,035,850.00 rows=3,143,540,000 width=145) (actual rows= loops=)