explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Yp9R

Settings
# exclusive inclusive rows x rows loops node
1. 0.045 35.775 ↑ 1.0 1 1

Nested Loop (cost=17.75..40.38 rows=1 width=72) (actual time=35.774..35.775 rows=1 loops=1)

2. 0.000 31.740 ↑ 1.0 1 1

Limit (cost=8.87..20.18 rows=1 width=24) (actual time=31.740..31.740 rows=1 loops=1)

3.          

Initplan (forLimit)

4. 2.963 2.963 ↑ 1.0 1 1

Index Scan using articles_pkey on articles (cost=0.43..8.45 rows=1 width=4) (actual time=2.962..2.963 rows=1 loops=1)

  • Index Cond: (article_id = 'LEGIARTI000006581613'::text)
5. 31.738 31.738 ↑ 1,868.0 1 1

Index Scan using articles_parent_text_id_global_order_idx on articles structure (cost=0.43..21,118.16 rows=1,868 width=24) (actual time=31.738..31.738 rows=1 loops=1)

  • Index Cond: ((parent_text_id = 'LEGITEXT000006069577'::text) AND (global_order > $0))
  • Filter: (((initial_version <> 'LEGITEXT000006071367'::text) AND (state = 'VIGUEUR'::text)) OR ((state = 'ABROGE_DIFF'::text) AND (ending_date > now())))
  • Rows Removed by Filter: 8
6. 0.000 3.990 ↑ 1.0 1 1

Limit (cost=8.87..20.17 rows=1 width=24) (actual time=3.990..3.990 rows=1 loops=1)

7.          

Initplan (forLimit)

8. 0.039 0.039 ↑ 1.0 1 1

Index Scan using articles_pkey on articles articles_1 (cost=0.43..8.45 rows=1 width=4) (actual time=0.039..0.039 rows=1 loops=1)

  • Index Cond: (article_id = 'LEGIARTI000006581613'::text)
9. 3.990 3.990 ↑ 2,083.0 1 1

Index Scan using articles_parent_text_id_global_order_idx on articles structure_1 (cost=0.43..23,530.96 rows=2,083 width=24) (actual time=3.990..3.990 rows=1 loops=1)

  • Index Cond: ((parent_text_id = 'LEGITEXT000006071367'::text) AND (global_order < $1))
  • Filter: (((initial_version <> 'LEGIARTI000006581610'::text) AND (state = 'VIGUEUR'::text)) OR ((state = 'ABROGE_DIFF'::text) AND (ending_date > now())))