explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qVy

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.003 49.078 ↑ 10.0 1 1

Limit (cost=17,906.54..17,906.74 rows=10 width=32) (actual time=49.076..49.078 rows=1 loops=1)

2.          

CTE structure_by_legislation

3. 47.219 47.219 ↓ 1.0 8,069 1

Seq Scan on articles_legislations_structure structure (cost=0.00..17,728.89 rows=7,815 width=79) (actual time=9.422..47.219 rows=8,069 loops=1)

  • Filter: (legislation_id = 'LEGITEXT000023086525'::text)
  • Rows Removed by Filter: 444562
4.          

CTE previous_current_next

5. 0.008 49.073 ↑ 39.0 1 1

WindowAgg (cost=176.87..177.65 rows=39 width=100) (actual time=49.072..49.073 rows=1 loops=1)

6. 0.013 49.065 ↑ 39.0 1 1

Sort (cost=176.87..176.97 rows=39 width=36) (actual time=49.065..49.065 rows=1 loops=1)

  • Sort Key: structure_1.global_order
  • Sort Method: quicksort Memory: 25kB
7. 49.052 49.052 ↑ 39.0 1 1

CTE Scan on structure_by_legislation structure_1 (cost=0.00..175.84 rows=39 width=36) (actual time=29.409..49.052 rows=1 loops=1)

  • Filter: (article_id = 'LEGIARTI000023080663'::text)
  • Rows Removed by Filter: 8068
8. 49.075 49.075 ↑ 39.0 1 1

CTE Scan on previous_current_next (cost=0.00..0.78 rows=39 width=32) (actual time=49.074..49.075 rows=1 loops=1)