explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nq3J

Settings
# exclusive inclusive rows x rows loops node
1. 11.864 11.864 ↓ 3.7 41 1

CTE Scan on pa_topic_i18n_descendants (cost=213.47..213.69 rows=11 width=172) (actual time=0.044..11.864 rows=41 loops=1)

2.          

CTE pa_topic_i18n_descendants

3. 0.186 11.741 ↓ 3.7 41 1

Recursive Union (cost=0.30..213.47 rows=11 width=172) (actual time=0.040..11.741 rows=41 loops=1)

4. 0.009 0.039 ↑ 1.0 1 1

Nested Loop (cost=0.30..13.14 rows=1 width=172) (actual time=0.034..0.039 rows=1 loops=1)

5. 0.018 0.018 ↑ 1.0 1 1

Index Scan using pat_ct_pk on pa_topics pat (cost=0.15..6.57 rows=1 width=12) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: (cod_topic = 0)
6. 0.012 0.012 ↑ 1.0 1 1

Index Scan using pati18n_ct_ci_pk on pa_topics_i18n patii8n (cost=0.15..6.57 rows=1 width=164) (actual time=0.010..0.012 rows=1 loops=1)

  • Index Cond: ((cod_topic = 0) AND ((cod_idioma)::text = 'es'::text))
7. 4.293 11.516 ↓ 10.0 10 4

Nested Loop (cost=0.47..20.01 rows=1 width=172) (actual time=1.039..2.879 rows=10 loops=4)

  • Join Filter: (patd.cod_topic = pat_1.cod_topic_parent)
  • Rows Removed by Join Filter: 410
8. 1.948 2.180 ↓ 20.0 420 4

Hash Join (cost=0.33..14.31 rows=21 width=168) (actual time=0.039..0.545 rows=420 loops=4)

  • Hash Cond: ((patii8n_1.cod_idioma)::text = (patd.cod_idioma)::text)
9. 0.144 0.144 ↑ 9.8 43 4

Seq Scan on pa_topics_i18n patii8n_1 (cost=0.00..12.20 rows=420 width=164) (actual time=0.004..0.036 rows=43 loops=4)

10. 0.044 0.088 ↑ 1.0 10 4

Hash (cost=0.20..0.20 rows=10 width=24) (actual time=0.022..0.022 rows=10 loops=4)

  • Buckets: 1,024 Batches: 1 Memory Usage: 5kB
11. 0.044 0.044 ↑ 1.0 10 4

WorkTable Scan on pa_topic_i18n_descendants patd (cost=0.00..0.20 rows=10 width=24) (actual time=0.003..0.011 rows=10 loops=4)

12. 5.043 5.043 ↑ 1.0 1 1,681

Index Scan using pat_ct_pk on pa_topics pat_1 (cost=0.15..0.26 rows=1 width=12) (actual time=0.002..0.003 rows=1 loops=1,681)

  • Index Cond: (cod_topic = patii8n_1.cod_topic)