explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JSFn

Settings
# exclusive inclusive rows x rows loops node
1. 0.029 85,274.240 ↑ 1.0 501 1

Limit (cost=389,405.87..389,407.12 rows=501 width=14) (actual time=85,274.186..85,274.240 rows=501 loops=1)

2. 63.067 85,274.211 ↑ 56.6 501 1

Sort (cost=389,405.87..389,476.75 rows=28,355 width=14) (actual time=85,274.185..85,274.211 rows=501 loops=1)

  • Sort Key: d.delo_dat DESC, d.delo_id DESC
  • Sort Method: top-N heapsort Memory: 48kB
3. 43.836 85,211.144 ↓ 1.5 43,173 1

Nested Loop (cost=2.00..387,992.56 rows=28,355 width=14) (actual time=12.915..85,211.144 rows=43,173 loops=1)

4. 44,411.996 44,411.996 ↓ 1.2 43,173 1

Index Scan using delo_delo_dat_desc on delo d (cost=1.56..117,701.23 rows=34,818 width=27) (actual time=0.306..44,411.996 rows=43,173 loops=1)

  • Index Cond: (((ogai_nah_kod)::text = (apr_session_params.get_ogai_code())::text) AND (delo_dat >= to_date('2020-06-20'::text)) AND (delo_dat <= to_date('2020-07-02'::text)) AND (delo_dat >= add_months(trunc_date(current_local_time()), '-6'::numeric)))
  • Filter: (delo_tip = '1'::numeric)
5. 40,755.312 40,755.312 ↑ 1.0 1 43,173

Index Scan using viol_pk on viol v (cost=0.43..7.75 rows=1 width=37) (actual time=0.933..0.944 rows=1 loops=43,173)

  • Index Cond: (delo_id = d.delo_id)
Planning time : 1.385 ms
Execution time : 85,274.316 ms