explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yCpN

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 172.174 ↑ 1.0 10 1

Limit (cost=24,768.64..24,768.84 rows=10 width=32) (actual time=172.154..172.174 rows=10 loops=1)

2.          

CTE structure_by_legislation

3. 144.190 144.190 ↓ 5.9 29,268 1

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

  • Filter: (legislation_id = 'LEGITEXT000006071367'::text)
  • Rows Removed by Filter: 800401
4.          

CTE previous_current_next

5. 0.027 172.162 ↑ 492.3 10 1

WindowAgg (cost=400.37..498.83 rows=4,923 width=100) (actual time=172.151..172.162 rows=10 loops=1)

6. 13.755 172.135 ↑ 447.5 11 1

Sort (cost=400.37..412.68 rows=4,923 width=36) (actual time=172.135..172.135 rows=11 loops=1)

  • Sort Key: structure_1.global_order
  • Sort Method: quicksort Memory: 3055kB
7. 158.380 158.380 ↓ 5.9 29,268 1

CTE Scan on structure_by_legislation structure_1 (cost=0.00..98.46 rows=4,923 width=36) (actual time=0.137..158.380 rows=29,268 loops=1)

8. 172.169 172.169 ↑ 492.3 10 1

CTE Scan on previous_current_next (cost=0.00..98.46 rows=4,923 width=32) (actual time=172.153..172.169 rows=10 loops=1)