explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 60lk

Settings
# exclusive inclusive rows x rows loops node
1. 34.497 126,240.063 ↑ 1.2 206,955 1

Unique (cost=1,734,830.35..1,736,072.91 rows=248,511 width=32) (actual time=126,178.484..126,240.063 rows=206,955 loops=1)

2. 347.463 126,205.566 ↑ 1.1 217,142 1

Sort (cost=1,734,830.35..1,735,451.63 rows=248,511 width=32) (actual time=126,178.483..126,205.566 rows=217,142 loops=1)

  • Sort Key: delo.delo_id
  • Sort Method: external merge Disk: 3,600kB
3. 18.757 125,858.103 ↑ 1.1 217,142 1

Append (cost=1,000.57..1,708,992.20 rows=248,511 width=32) (actual time=14.620..125,858.103 rows=217,142 loops=1)

4. 0.000 53,720.893 ↑ 1.4 178,051 1

Gather (cost=1,000.57..1,496,061.97 rows=248,279 width=6) (actual time=14.620..53,720.893 rows=178,051 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
5. 34.614 53,829.688 ↑ 1.6 25,436 7 / 7

Nested Loop Anti Join (cost=0.57..1,470,234.07 rows=41,380 width=6) (actual time=12.828..53,829.688 rows=25,436 loops=7)

6. 26,683.344 26,683.344 ↑ 1.4 31,020 7 / 7

Parallel Seq Scan on delo (cost=0.00..1,405,636.83 rows=42,075 width=6) (actual time=6.702..26,683.344 rows=31,020 loops=7)

  • Filter: (((ogai_nah_kod)::text = '45597'::text) AND (stad_delo_kod = ANY ('{3,4,5}'::numeric[])) AND (delo_dat >= date_trunc('year'::text, ((('now'::cstring)::date - '1 year'::interval) - '2 mons'::interval))) AND (delo_dat <= ((date_trunc('year'::text, ((('now'::cstring)::date - '1 year'::interval) - '2 mons'::interval)) + '1 year'::interval) - '1 day'::interval)))
  • Rows Removed by Filter: 2,164,546
7. 27,111.730 27,111.730 ↓ 0.0 0 217,142 / 7

Index Only Scan using delo_tags_tag_uniq on delo_tags tag (cost=0.57..1.54 rows=1 width=6) (actual time=0.874..0.874 rows=0 loops=217,142)

  • Index Cond: ((card_id = delo.delo_id) AND (card_category = '1'::numeric) AND (type_id = '8'::numeric))
  • Heap Fetches: 0
8. 51.708 72,118.453 ↓ 168.5 39,091 1

Nested Loop Semi Join (cost=67,685.92..210,445.12 rows=232 width=7) (actual time=57,258.305..72,118.453 rows=39,091 loops=1)

9. 13,092.726 70,170.393 ↓ 3.5 49,904 1

Bitmap Heap Scan on delo delo_1 (cost=67,685.36..185,505.82 rows=14,062 width=13) (actual time=57,213.690..70,170.393 rows=49,904 loops=1)

  • Recheck Cond: ((delo_main_id IS NOT NULL) AND ((ogai_nah_kod)::text = '45597'::text) AND (delo_dat >= date_trunc('year'::text, ((('now'::cstring)::date - '1 year'::interval) - '2 mons'::interval))) AND (delo_dat <= ((date_trunc('year'::text, ((('now'::cstring)::date - '1 year'::interval) - '2 mons'::interval)) + '1 year'::interval) - '1 day'::interval)))
  • Rows Removed by Index Recheck: 2,158,598
  • Filter: (stad_delo_kod = ANY ('{3,4,5}'::numeric[]))
  • Rows Removed by Filter: 53,709
  • Heap Blocks: exact=12,875 lossy=181,524
10. 44.003 57,077.667 ↓ 0.0 0 1

BitmapAnd (cost=67,685.36..67,685.36 rows=102,315 width=0) (actual time=57,077.667..57,077.667 rows=0 loops=1)

11. 3,475.885 3,475.885 ↓ 1.1 915,827 1

Bitmap Index Scan on delo_delo_main_id (cost=0.00..14,831.48 rows=852,532 width=0) (actual time=3,475.885..3,475.885 rows=915,827 loops=1)

12. 53,557.779 53,557.779 ↑ 1.1 1,748,975 1

Bitmap Index Scan on delo_delo_dat_desc (cost=0.00..52,846.59 rows=1,836,896 width=0) (actual time=53,557.779..53,557.779 rows=1,748,975 loops=1)

  • Index Cond: (((ogai_nah_kod)::text = '45597'::text) AND (delo_dat >= date_trunc('year'::text, ((('now'::cstring)::date - '1 year'::interval) - '2 mons'::interval))) AND (delo_dat <= ((date_trunc('year'::text, ((('now'::cstring)::date - '1 year'::interval) - '2 mons'::interval)) + '1 year'::interval) - '1 day'::interval)))
13. 1,896.352 1,896.352 ↑ 1.0 1 49,904

Index Only Scan using delo_tags_tag_uniq on delo_tags tag_1 (cost=0.57..1.77 rows=1 width=6) (actual time=0.038..0.038 rows=1 loops=49,904)

  • Index Cond: ((card_id = delo_1.delo_id) AND (card_category = '1'::numeric) AND (type_id = '8'::numeric))
  • Heap Fetches: 0
Planning time : 0.807 ms
Execution time : 126,253.686 ms