explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6p67

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 282.622 ↑ 166.5 2 1

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

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

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

3. 0.009 282.489 ↑ 230.0 2 1

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

4. 0.000 282.436 ↑ 153.0 2 1

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

  • Group Key: (v2.license_plate)::text
5. 9.604 282.474 ↑ 153.0 2 1

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

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.041 272.870 ↑ 128.0 1 3 / 3

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

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

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

8. 272.775 272.775 ↑ 128.0 1 3 / 3

Parallel Seq Scan on tbl_registration r2 (cost=0.00..26,663.87 rows=128 width=37) (actual time=192.663..272.775 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.023 0.023 ↑ 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.035..0.035 rows=1 loops=2)

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

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

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

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

  • Filter: antai_enabled
12. 0.044 0.044 ↑ 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.022..0.022 rows=1 loops=2)

  • Index Cond: ((license_plate)::text = (v2.license_plate)::text)
13. 0.028 0.028 ↑ 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.014..0.014 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.483 ms
Execution time : 282.780 ms