explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7LMn

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 279.163 ↑ 166.5 2 1

Hash Join (cost=28,746.40..30,862.35 rows=333 width=881) (actual time=279.131..279.163 rows=2 loops=1)

  • Hash Cond: ((v.plate_holder_id)::text = (tph.id)::text)
2. 0.009 279.080 ↑ 166.5 2 1

Nested Loop (cost=28,742.34..30,857.34 rows=333 width=740) (actual time=279.051..279.080 rows=2 loops=1)

3. 0.008 279.041 ↑ 230.0 2 1

Nested Loop (cost=28,741.92..29,329.65 rows=460 width=74) (actual time=279.027..279.041 rows=2 loops=1)

4. 0.000 278.991 ↑ 153.0 2 1

HashAggregate (cost=28,741.50..28,744.56 rows=306 width=7) (actual time=278.989..278.991 rows=2 loops=1)

  • Group Key: (v2.license_plate)::text
5. 11.371 282.764 ↑ 153.0 2 1

Gather (cost=1,004.48..28,740.73 rows=306 width=7) (actual time=39.831..282.764 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.006 271.393 ↑ 128.0 1 3 / 3

Hash Join (cost=4.48..27,710.13 rows=128 width=7) (actual time=191.937..271.393 rows=1 loops=3)

  • Hash Cond: ((v2.plate_holder_id)::text = (t.id)::text)
7. 0.005 271.372 ↑ 128.0 1 3 / 3

Nested Loop (cost=0.42..27,705.71 rows=128 width=21) (actual time=191.917..271.372 rows=1 loops=3)

8. 271.354 271.354 ↑ 128.0 1 3 / 3

Parallel Seq Scan on tbl_registration r2 (cost=0.00..26,663.87 rows=128 width=37) (actual time=191.904..271.354 rows=1 loops=3)

  • Filter: ((inactivated_date_time IS NULL) AND (created_timestamp > to_date('20200624'::text, 'yyyymmdd'::text)))
  • Rows Removed by Filter: 157,806
9. 0.013 0.013 ↑ 1.0 1 2 / 3

Index Scan using tbl_vehicle_pkey on tbl_vehicle v2 (cost=0.42..8.14 rows=1 width=58) (actual time=0.019..0.019 rows=1 loops=2)

  • Index Cond: ((id)::text = (r2.vehicle_id)::text)
10. 0.007 0.015 ↑ 1.0 47 1 / 3

Hash (cost=3.47..3.47 rows=47 width=25) (actual time=0.044..0.044 rows=47 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
11. 0.008 0.008 ↑ 1.0 47 1 / 3

Seq Scan on tbl_plate_holder t (cost=0.00..3.47 rows=47 width=25) (actual time=0.007..0.024 rows=47 loops=1)

  • Filter: antai_enabled
12. 0.042 0.042 ↑ 2.0 1 2

Index Scan using idx_vehicle_license_plate on tbl_vehicle v (cost=0.42..1.89 rows=2 width=74) (actual time=0.020..0.021 rows=1 loops=2)

  • Index Cond: ((license_plate)::text = (v2.license_plate)::text)
13. 0.030 0.030 ↑ 1.0 1 2

Index Scan using idx_registration_vehicle_id on tbl_registration r (cost=0.42..3.31 rows=1 width=666) (actual time=0.015..0.015 rows=1 loops=2)

  • Index Cond: ((vehicle_id)::text = (v.id)::text)
  • Filter: (inactivated_date_time IS NULL)
14. 0.032 0.069 ↑ 1.0 47 1

Hash (cost=3.47..3.47 rows=47 width=141) (actual time=0.069..0.069 rows=47 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
15. 0.037 0.037 ↑ 1.0 47 1

Seq Scan on tbl_plate_holder tph (cost=0.00..3.47 rows=47 width=141) (actual time=0.011..0.037 rows=47 loops=1)

  • Filter: antai_enabled
Planning time : 1.375 ms
Execution time : 283.074 ms