explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n9gA

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 980.452 ↑ 1.0 200 1

Limit (cost=129,100.58..129,101.08 rows=200 width=129) (actual time=980.431..980.452 rows=200 loops=1)

2. 213.149 980.438 ↑ 2,325.8 200 1

Sort (cost=129,100.58..130,263.48 rows=465,160 width=129) (actual time=980.429..980.438 rows=200 loops=1)

  • Sort Key: (to_char(tb_pivot_news.dh_news, 'YYYYMMDDHH24MISS'::text)) DESC
  • Sort Method: top-N heapsort Memory: 101kB
3. 574.192 767.289 ↓ 1.2 546,213 1

Nested Loop (cost=0.42..108,996.70 rows=465,160 width=129) (actual time=0.041..767.289 rows=546,213 loops=1)

4. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on tb_pivot_news_agency (cost=0.00..1.03 rows=1 width=20) (actual time=0.008..0.008 rows=1 loops=1)

  • Filter: ((id_contract = 8) AND (id_agency = 2))
  • Rows Removed by Filter: 1
5. 193.089 193.089 ↓ 1.2 546,213 1

Index Scan using idx0_tb_pivot_news on tb_pivot_news (cost=0.42..103,181.17 rows=465,160 width=97) (actual time=0.024..193.089 rows=546,213 loops=1)

  • Index Cond: ((id_contract = 8) AND (id_agency = 2))