explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mn5Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.941 33,827.292 ↑ 1.0 1 1

Subquery Scan on article (cost=63,466.50..63,523.70 rows=1 width=85) (actual time=33,824.256..33,827.292 rows=1 loops=1)

  • Filter: (article.article_id = 'LEGIARTI000006594341'::text)
  • Rows Removed by Filter: 9316
2. 6.229 33,826.351 ↓ 5.3 9,317 1

WindowAgg (cost=63,466.50..63,501.70 rows=1,760 width=89) (actual time=33,819.274..33,826.351 rows=9,317 loops=1)

3. 12.353 33,820.122 ↓ 5.3 9,317 1

Sort (cost=63,466.50..63,470.90 rows=1,760 width=25) (actual time=33,819.237..33,820.122 rows=9,317 loops=1)

  • Sort Key: structure.global_order
  • Sort Method: quicksort Memory: 1112kB
4. 32.843 33,807.769 ↓ 5.3 9,317 1

Nested Loop (cost=0.43..63,371.62 rows=1,760 width=25) (actual time=9.891..33,807.769 rows=9,317 loops=1)

5. 1,580.126 1,580.126 ↓ 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=8.482..1,580.126 rows=29,268 loops=1)

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

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

  • Index Cond: (article_id = structure.article_id)
  • Filter: (((initial_version <> 'LEGIARTI000006594341'::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
Planning time : 114.389 ms
Execution time : 33,827.531 ms