explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jauU

Settings
# exclusive inclusive rows x rows loops node
1. 1.073 832.927 ↑ 1.0 1 1

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

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

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

3. 5.894 825.055 ↓ 5.3 9,317 1

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

  • Sort Key: structure.global_order
  • Sort Method: quicksort Memory: 1112kB
4. 17.892 819.161 ↓ 5.3 9,317 1

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

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

  • Filter: (legislation_id = 'LEGITEXT000006071367'::text)
  • Rows Removed by Filter: 800401
6. 673.164 673.164 ↓ 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.023..0.023 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