explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jpND

Settings
# exclusive inclusive rows x rows loops node
1. 51.503 1,354.517 ↓ 22.9 62,816 1

GroupAggregate (cost=202,283.52..202,407.09 rows=2,746 width=67) (actual time=1,290.839..1,354.517 rows=62,816 loops=1)

  • Group Key: kierowca.kierowca_id, driver_events_filter.datetime_from, driver_events_filter.status_id, driver_events_filter.driver, kierowca.imie, kierowca.nazwisko, driver_events_filter.country, country.name, driver_events_filter.datetime_to
2. 89.424 1,303.014 ↓ 22.9 62,816 1

Sort (cost=202,283.52..202,290.38 rows=2,746 width=67) (actual time=1,290.822..1,303.014 rows=62,816 loops=1)

  • Sort Key: kierowca.kierowca_id, driver_events_filter.datetime_from, driver_events_filter.status_id, driver_events_filter.driver, kierowca.imie, kierowca.nazwisko, driver_events_filter.country, country.name, driver_events_filter.datetime_to
  • Sort Method: external merge Disk: 4968kB
3. 20.623 1,213.590 ↓ 22.9 62,816 1

Nested Loop Left Join (cost=401.12..202,126.68 rows=2,746 width=67) (actual time=9.205..1,213.590 rows=62,816 loops=1)

4. 11.743 1,067.335 ↓ 22.9 62,816 1

Nested Loop (cost=400.97..201,645.51 rows=2,746 width=56) (actual time=9.185..1,067.335 rows=62,816 loops=1)

5. 2.925 4.549 ↓ 1.3 371 1

Hash Join (cost=231.66..510.01 rows=293 width=34) (actual time=0.533..4.549 rows=371 loops=1)

  • Hash Cond: (kk.kierowca_id = kierowca.kierowca_id)
6. 1.146 1.146 ↓ 1.0 11,481 1

Seq Scan on kierowca_kod kk (cost=0.00..232.49 rows=11,449 width=22) (actual time=0.004..1.146 rows=11,481 loops=1)

7. 0.092 0.478 ↑ 1.0 401 1

Hash (cost=226.55..226.55 rows=409 width=20) (actual time=0.478..0.478 rows=401 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
8. 0.336 0.386 ↑ 1.0 401 1

Bitmap Heap Scan on kierowca (cost=11.45..226.55 rows=409 width=20) (actual time=0.063..0.386 rows=401 loops=1)

  • Recheck Cond: (firma1_id = 152)
  • Heap Blocks: exact=91
9. 0.050 0.050 ↑ 1.0 401 1

Bitmap Index Scan on kierowca_firma1_id (cost=0.00..11.35 rows=409 width=0) (actual time=0.050..0.050 rows=401 loops=1)

  • Index Cond: (firma1_id = 152)
10. 782.439 1,051.043 ↓ 11.3 169 371

Bitmap Heap Scan on driver_events_filter (cost=169.31..686.32 rows=15 width=36) (actual time=2.741..2.833 rows=169 loops=371)

  • Recheck Cond: ((driver)::text = (kk.kod_identyfikatora14)::text)
  • Filter: ((datetime_from >= '2019-11-01 00:00:00+01'::timestamp with time zone) AND (datetime_from < '2019-11-28 00:00:00+01'::timestamp with time zone) AND (status_id = ANY ('{0,1,2,3}'::integer[])))
  • Rows Removed by Filter: 10688
  • Heap Blocks: exact=184706
11. 268.604 268.604 ↓ 1.1 10,868 371

Bitmap Index Scan on driver_events_filter_index01 (cost=0.00..169.31 rows=10,268 width=0) (actual time=0.724..0.724 rows=10,868 loops=371)

  • Index Cond: ((driver)::text = (kk.kod_identyfikatora14)::text)
12. 125.632 125.632 ↑ 1.0 1 62,816

Index Scan using country_code3_x on country (cost=0.15..0.17 rows=1 width=15) (actual time=0.002..0.002 rows=1 loops=62,816)

  • Index Cond: ((code3)::text = (driver_events_filter.country)::text)
Planning time : 1.755 ms
Execution time : 1,358.055 ms