explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fAIE

Settings
# exclusive inclusive rows x rows loops node
1. 0.899 9,070.201 ↓ 0.0 0 1

Subquery Scan on article (cost=63,466.50..63,523.70 rows=1 width=85) (actual time=9,070.201..9,070.201 rows=0 loops=1)

  • Filter: (article.article_id = 'LEGIARTI000028016843'::text)
  • Rows Removed by Filter: 9318
2. 5.831 9,069.302 ↓ 5.3 9,318 1

WindowAgg (cost=63,466.50..63,501.70 rows=1,760 width=89) (actual time=9,062.617..9,069.302 rows=9,318 loops=1)

3. 7.905 9,063.471 ↓ 5.3 9,318 1

Sort (cost=63,466.50..63,470.90 rows=1,760 width=25) (actual time=9,062.606..9,063.471 rows=9,318 loops=1)

  • Sort Key: structure.global_order
  • Sort Method: quicksort Memory: 1112kB
4. 6.389 9,055.566 ↓ 5.3 9,318 1

Nested Loop (cost=0.43..63,371.62 rows=1,760 width=25) (actual time=19.237..9,055.566 rows=9,318 loops=1)

5. 883.405 883.405 ↓ 5.9 29,268 1

Seq Scan on articles_legislations_structure structure (cost=0.00..24,269.81 rows=4,923 width=25) (actual time=18.041..883.405 rows=29,268 loops=1)

  • Filter: (legislation_id = 'LEGITEXT000006071367'::text)
  • Rows Removed by Filter: 800401
6. 8,165.772 8,165.772 ↓ 0.0 0 29,268

Index Scan using articles_pkey on articles joined (cost=0.43..7.93 rows=1 width=52) (actual time=0.274..0.279 rows=0 loops=29,268)

  • Index Cond: (article_id = structure.article_id)
  • Filter: (((initial_version <> 'LEGITEXT000006071367'::text) AND (state = 'VIGUEUR'::text)) OR ((state = 'ABROGE_DIFF'::text) AND (ending_date > now())) OR (structure.article_id = 'LEGIARTI000006594341'::text))
  • Rows Removed by Filter: 1