explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FjHN

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 6.003 ↑ 10.0 1 1

Limit (cost=11,721.24..11,721.44 rows=10 width=32) (actual time=6.001..6.003 rows=1 loops=1)

2.          

CTE structure_by_legislation

3. 1.567 2.611 ↓ 1.0 8,069 1

Bitmap Heap Scan on articles_legislations_structure structure (cost=216.99..11,543.59 rows=7,815 width=79) (actual time=1.067..2.611 rows=8,069 loops=1)

  • Recheck Cond: (legislation_id = 'LEGITEXT000023086525'::text)
  • Heap Blocks: exact=163
4. 1.044 1.044 ↓ 1.0 8,069 1

Bitmap Index Scan on legislation_id_index (cost=0.00..215.04 rows=7,815 width=0) (actual time=1.044..1.044 rows=8,069 loops=1)

  • Index Cond: (legislation_id = 'LEGITEXT000023086525'::text)
5.          

CTE previous_current_next

6. 0.005 5.999 ↑ 39.0 1 1

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

7. 0.009 5.994 ↑ 39.0 1 1

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

  • Sort Key: structure_1.global_order
  • Sort Method: quicksort Memory: 25kB
8. 5.985 5.985 ↑ 39.0 1 1

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

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

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