explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WXo1

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 634.179 ↑ 1.0 1 1

Limit (cost=130,618.25..130,618.30 rows=1 width=33) (actual time=634.179..634.179 rows=1 loops=1)

2. 34.534 634.178 ↑ 22,763,869,129.0 1 1

Nested Loop Left Join (cost=130,618.25..1,291,424,255.31 rows=22,763,869,129 width=33) (actual time=634.178..634.178 rows=1 loops=1)

  • Join Filter: (previous."order" < current."order")
  • Rows Removed by Join Filter: 452631
3. 4.808 287.491 ↑ 150,877.0 1 1

Nested Loop Left Join (cost=65,309.33..76,633.13 rows=150,877 width=29) (actual time=287.491..287.491 rows=1 loops=1)

  • Join Filter: (next."order" > current."order")
  • Rows Removed by Join Filter: 67049
4. 0.026 0.026 ↑ 1.0 1 1

Index Scan using articles_legislations_structure_pkey on articles_legislations_structure current (cost=0.42..8.44 rows=1 width=25) (actual time=0.026..0.026 rows=1 loops=1)

  • Index Cond: (article_id = 'LEGIARTI000006199733'::text)
5. 207.779 282.657 ↑ 6.8 67,050 1

Sort (cost=65,308.91..66,440.49 rows=452,631 width=4) (actual time=274.775..282.657 rows=67,050 loops=1)

  • Sort Key: next."order
  • Sort Method: external sort Disk: 7960kB
6. 74.878 74.878 ↑ 1.0 452,631 1

Seq Scan on articles_legislations_structure next (cost=0.00..16,597.31 rows=452,631 width=4) (actual time=0.105..74.878 rows=452,631 loops=1)

7. 58.010 312.153 ↑ 1.0 452,631 1

Materialize (cost=65,308.91..74,998.95 rows=452,631 width=4) (actual time=176.354..312.153 rows=452,631 loops=1)

8. 184.859 254.143 ↑ 1.0 452,631 1

Sort (cost=65,308.91..66,440.49 rows=452,631 width=4) (actual time=176.348..254.143 rows=452,631 loops=1)

  • Sort Key: previous."order" DESC
  • Sort Method: external merge Disk: 6160kB
9. 69.284 69.284 ↑ 1.0 452,631 1

Seq Scan on articles_legislations_structure previous (cost=0.00..16,597.31 rows=452,631 width=4) (actual time=0.121..69.284 rows=452,631 loops=1)

Planning time : 0.146 ms
Execution time : 638.479 ms