explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UUTD : Before

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.006 11.076 ↑ 1.0 1 1

Subquery Scan on article (cost=12,979.11..12,979.60 rows=1 width=85) (actual time=11.060..11.076 rows=1 loops=1)

  • Filter: (article.article_id = 'LEGIARTI000023080663'::text)
  • Rows Removed by Filter: 13
2. 0.025 11.070 ↑ 1.1 14 1

WindowAgg (cost=12,979.11..12,979.41 rows=15 width=89) (actual time=11.051..11.070 rows=14 loops=1)

3. 0.013 11.045 ↑ 1.1 14 1

Sort (cost=12,979.11..12,979.15 rows=15 width=25) (actual time=11.043..11.045 rows=14 loops=1)

  • Sort Key: structure.global_order
  • Sort Method: quicksort Memory: 26kB
4. 1.937 11.032 ↑ 1.1 14 1

Hash Join (cost=1,745.50..12,978.82 rows=15 width=25) (actual time=7.783..11.032 rows=14 loops=1)

  • Hash Cond: (structure.article_id = joined.article_id)
  • Join Filter: (((joined.initial_version <> 'LEGIARTI000023086394'::text) AND (joined.state = 'VIGUEUR'::text)) OR ((joined.state = 'ABROGE_DIFF'::text) AND (joined.ending_date > now())) OR (structure.article_id = 'LEGIARTI000023080663'::text))
  • Rows Removed by Join Filter: 19
5. 1.514 2.550 ↓ 1.1 8,069 1

Bitmap Heap Scan on articles_legislations_structure structure (cost=399.12..11,602.47 rows=7,574 width=25) (actual time=1.060..2.550 rows=8,069 loops=1)

  • Recheck Cond: (legislation_id = 'LEGITEXT000023086525'::text)
  • Heap Blocks: exact=164
6. 1.036 1.036 ↓ 1.1 8,069 1

Bitmap Index Scan on legislation_id_index (cost=0.00..397.23 rows=7,574 width=0) (actual time=1.036..1.036 rows=8,069 loops=1)

  • Index Cond: (legislation_id = 'LEGITEXT000023086525'::text)
7. 1.939 6.545 ↑ 1.0 3,750 1

Hash (cost=1,299.50..1,299.50 rows=3,750 width=52) (actual time=6.545..6.545 rows=3,750 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 347kB
8. 4.606 4.606 ↑ 1.0 3,750 1

Seq Scan on articles joined (cost=0.00..1,299.50 rows=3,750 width=52) (actual time=0.117..4.606 rows=3,750 loops=1)