explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MqXs : Optimization for: plan #k95Q

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.732 20.875 ↑ 1.0 1,907 1

Hash Join (cost=1,446.16..1,533.46 rows=1,940 width=192) (actual time=15.612..20.875 rows=1,907 loops=1)

  • Hash Cond: (base.id = ets.id)
2.          

CTE base

3. 1.784 12.550 ↑ 1.0 1,907 1

Unique (cost=966.96..1,016.82 rows=1,940 width=24) (actual time=9.759..12.550 rows=1,907 loops=1)

4. 7.587 10.766 ↑ 1.0 9,971 1

Sort (cost=966.96..991.89 rows=9,971 width=24) (actual time=9.758..10.766 rows=9,971 loops=1)

  • Sort Key: external_tracking_status.order_id, external_tracking_status.tracking_system_timestamp, external_tracking_status.server_timestamp
  • Sort Method: quicksort Memory: 1163kB
5. 3.179 3.179 ↑ 1.0 9,971 1

Seq Scan on external_tracking_status (cost=0.00..304.71 rows=9,971 width=24) (actual time=0.006..3.179 rows=9,971 loops=1)

6. 13.306 13.306 ↑ 1.0 1,907 1

CTE Scan on base (cost=0.00..38.80 rows=1,940 width=4) (actual time=9.761..13.306 rows=1,907 loops=1)

7. 4.399 5.837 ↑ 1.0 9,971 1

Hash (cost=304.71..304.71 rows=9,971 width=192) (actual time=5.837..5.837 rows=9,971 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1638kB
8. 1.438 1.438 ↑ 1.0 9,971 1

Seq Scan on external_tracking_status ets (cost=0.00..304.71 rows=9,971 width=192) (actual time=0.003..1.438 rows=9,971 loops=1)