explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pxAZ : Optimization for: plan #Y0s8

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.077 7,140.504 ↑ 1.0 1,000 1

Limit (cost=351,991.81..352,030.35 rows=1,000 width=1,208) (actual time=7,138.899..7,140.504 rows=1,000 loops=1)

2. 3.823 7,140.427 ↑ 959.7 1,000 1

Hash Left Join (cost=351,991.81..388,978.66 rows=959,672 width=1,208) (actual time=7,138.898..7,140.427 rows=1,000 loops=1)

  • Hash Cond: ((trackers.id)::text = (tracking_details.tracker_id)::text)
3. 0.314 0.314 ↑ 464.3 2,067 1

Seq Scan on trackers (cost=0.00..36,483.02 rows=959,672 width=1,160) (actual time=0.011..0.314 rows=2,067 loops=1)

4. 309.079 7,136.290 ↓ 2.7 872,623 1

Hash (cost=350,852.50..350,852.50 rows=325,519 width=48) (actual time=7,136.290..7,136.290 rows=872,623 loops=1)

  • Buckets: 1,048,576 (originally 524288) Batches: 2 (originally 1) Memory Usage: 57,345kB
5. 4,918.149 6,827.211 ↓ 2.7 872,623 1

HashAggregate (cost=348,899.38..349,875.94 rows=325,519 width=48) (actual time=6,517.016..6,827.211 rows=872,623 loops=1)

  • Group Key: tracking_details.tracker_id
6. 1,909.062 1,909.062 ↑ 1.0 12,088,073 1

Seq Scan on tracking_details (cost=0.00..330,506.26 rows=12,262,085 width=40) (actual time=0.036..1,909.062 rows=12,088,073 loops=1)

Planning time : 0.229 ms
Execution time : 7,159.318 ms