explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 61Nf

Settings
# exclusive inclusive rows x rows loops node
1. 6.744 121.406 ↑ 1.4 1,361 1

Sort (cost=39,921.63..39,926.34 rows=1,883 width=522) (actual time=121.300..121.406 rows=1,361 loops=1)

  • Sort Key: pojazd.nr_rejestracyjny
  • Sort Method: quicksort Memory: 388kB
2. 0.308 114.662 ↑ 1.4 1,361 1

Nested Loop (cost=2,782.00..39,819.20 rows=1,883 width=522) (actual time=45.518..114.662 rows=1,361 loops=1)

3. 11.442 48.414 ↓ 1.0 9,420 1

HashAggregate (cost=2,781.70..2,875.84 rows=9,414 width=8) (actual time=45.333..48.414 rows=9,420 loops=1)

  • Group Key: grupa_pojazdow_pojazd.pojazd_id
4. 11.352 36.972 ↑ 1.1 18,747 1

Merge Join (cost=1,622.83..2,732.20 rows=19,798 width=8) (actual time=14.260..36.972 rows=18,747 loops=1)

  • Merge Cond: (grupa_pojazdow_pojazd.grupa_pojazdow_id = auser_grupa_pojazdow.grupa_pojazdow_id)
5. 9.327 9.327 ↓ 1.0 17,816 1

Index Scan using grupa_pojazdow_pojazd_grupa_pojazdow_id on grupa_pojazdow_pojazd (cost=0.29..784.38 rows=17,802 width=16) (actual time=0.050..9.327 rows=17,816 loops=1)

6. 3.703 16.293 ↓ 8.7 19,388 1

Sort (cost=1,622.55..1,628.14 rows=2,237 width=4) (actual time=14.202..16.293 rows=19,388 loops=1)

  • Sort Key: auser_grupa_pojazdow.grupa_pojazdow_id
  • Sort Method: quicksort Memory: 209kB
7. 11.717 12.590 ↓ 1.1 2,409 1

Bitmap Heap Scan on auser_grupa_pojazdow (cost=45.76..1,498.09 rows=2,237 width=4) (actual time=1.170..12.590 rows=2,409 loops=1)

  • Recheck Cond: (auser_id = 1)
  • Heap Blocks: exact=682
8. 0.873 0.873 ↓ 1.1 2,409 1

Bitmap Index Scan on auser_grupa_pojazdow_user_id_x (cost=0.00..45.20 rows=2,237 width=0) (actual time=0.873..0.873 rows=2,409 loops=1)

  • Index Cond: (auser_id = 1)
9. 65.940 65.940 ↓ 0.0 0 9,420

Index Scan using pojazd_pkey on pojazd (cost=0.30..3.90 rows=1 width=522) (actual time=0.007..0.007 rows=0 loops=9,420)

  • Index Cond: (pojazd_id = grupa_pojazdow_pojazd.pojazd_id)
  • Filter: (lower((nr_rejestracyjny)::text) ~~ '%dw%'::text)
  • Rows Removed by Filter: 1
Planning time : 4.883 ms
Execution time : 122.136 ms