explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 58lu

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

Subquery Scan b (cost=21,456,528.86..21,525,160.46 rows=2 width=4,388) (actual rows= loops=)

  • Filter: (((b.num_dom)::text ~~ '%340%'::text) AND (b.roworder = 1) AND ((b.frente)::text = 'ESMERALDA'::text))
2. 0.000 0.000 ↓ 0.0

WindowAgg (cost=21,456,528.86..21,495,134.14 rows=1,715,790 width=4,380) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=21,456,528.86..21,460,818.34 rows=1,715,790 width=4,380) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".frente, "*SELECT* 1".num_dom, "*SELECT* 1".gid
4. 0.000 0.000 ↓ 0.0

Unique (cost=5,027,734.07..5,104,944.62 rows=1,715,790 width=640) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=5,027,734.07..5,032,023.54 rows=1,715,790 width=640) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".gid, "*SELECT* 1".seccion, "*SELECT* 1".manzana, "*SELECT* 1".parcela, "*SELECT* 1".obs, "*SELECT* 1".s_m_p, "*SELECT* 1".weblink, (''::text), "*SELECT* 1".rot_sec, "*SELECT* 1".partida, "*SELECT* 1".the_geom, "*SELECT* 1".frente, "*SELECT* 1".num_dom, "*SELECT* 1".barrios, "*SELECT* 1".comuna, "*SELECT* 1".sup_edif, "*SELECT* 1".unidades
6. 0.000 0.000 ↓ 0.0

Append (cost=2,733,859.37..2,903,038.23 rows=1,715,790 width=640) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 1" (cost=2,733,859.37..2,828,227.77 rows=1,715,789 width=640) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Unique (cost=2,733,859.37..2,811,069.88 rows=1,715,789 width=640) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Sort (cost=2,733,859.37..2,738,148.85 rows=1,715,789 width=640) (actual rows= loops=)

  • Sort Key: public.mo_parcelasmap.gid, (split_part((public.mo_parcelasmap.smp)::text, '-'::text, 1)), (split_part((public.mo_parcelasmap.smp)::text, '-'::text, 2)), (split_part((public.mo_parcelasmap.smp)::text, '-'::text, 3)), public.mo_parcelasmap.obs, public.mo_parcelasmap.smp, (CASE WHEN (length(ltrim(split_part((public.mo_parcelasmap.smp)::text, '-'::text, 1), '0'::text)) = 1) THEN ('0'::text || ltrim(split_part((public.mo_parcelasmap.smp)::text, '-'::text, 1), '0'::text)) ELSE ltrim(split_part((public.mo_parcelasmap.smp)::text, '-'::text, 1), '0'::text) END), public.mo_parcelasmap.partida, public.mo_parcelasmap.the_geom, ((public.mo_orasync.calle)::character varying(254)), ((CASE WHEN (public.mo_orasync.numeros <> ''::text) THEN public.mo_orasync.numeros ELSE 'N'::text END)::character varying(254)), public.mo_parcelasmap.barrios, public.mo_parcelasmap.comuna, public.mo_parcelasmap.sup_edif, public.mo_parcelasmap.unidades
10. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=435,461.07..609,163.64 rows=1,715,789 width=640) (actual rows= loops=)

  • Merge Cond: ((public.mo_parcelasmap.smp)::text = (f.smp)::text)
11. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=366,547.09..442,697.34 rows=1,289,012 width=640) (actual rows= loops=)

  • Merge Cond: ((public.mo_parcelasmap.smp)::text = (public.mo_orasync.smp)::text)
12. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=366,547.09..376,127.68 rows=319,353 width=626) (actual rows= loops=)

  • Merge Cond: ((public.mo_parcelasmap.smp)::text = (public.mo_parcelasmap.smp)::text)
13. 0.000 0.000 ↓ 0.0

Sort (cost=306,617.05..307,415.43 rows=319,353 width=613) (actual rows= loops=)

  • Sort Key: public.mo_parcelasmap.smp
14. 0.000 0.000 ↓ 0.0

Seq Scan on mo_parcelasmap (cost=0.00..15,445.53 rows=319,353 width=613) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Materialize (cost=59,930.05..63,921.96 rows=319,353 width=25) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Sort (cost=59,930.05..60,728.43 rows=319,353 width=25) (actual rows= loops=)

  • Sort Key: public.mo_parcelasmap.smp
17. 0.000 0.000 ↓ 0.0

Seq Scan on mo_parcelasmap (cost=0.00..15,445.53 rows=319,353 width=25) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Index Scan using morasync_smp on mo_orasync (cost=0.00..49,658.63 rows=1,289,012 width=26) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Materialize (cost=68,913.98..74,227.56 rows=425,087 width=12) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Sort (cost=68,913.98..69,976.69 rows=425,087 width=12) (actual rows= loops=)

  • Sort Key: f.smp
21. 0.000 0.000 ↓ 0.0

Seq Scan on frentesparcelas f (cost=0.00..14,641.87 rows=425,087 width=12) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Subquery Scan "*SELECT* 2" (cost=20,997.44..74,810.46 rows=1 width=32) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=20,997.44..74,810.45 rows=1 width=32) (actual rows= loops=)

  • Hash Cond: ((public.mo_orasync.smp)::text = (public.mo_parcelasmap.smp)::text)
24. 0.000 0.000 ↓ 0.0

Seq Scan on mo_orasync (cost=0.00..23,350.12 rows=1,289,012 width=32) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Hash (cost=15,445.53..15,445.53 rows=319,353 width=12) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on mo_parcelasmap (cost=0.00..15,445.53 rows=319,353 width=12) (actual rows= loops=)