explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n7Fv

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 8.526 5,931.067 ↑ 6.0 44 1

GroupAggregate (cost=20,962.38..20,970.96 rows=264 width=111) (actual time=5,922.504..5,931.067 rows=44 loops=1)

  • Group Key: lookup.county
2. 0.596 5,922.541 ↓ 2.3 596 1

Sort (cost=20,962.38..20,963.04 rows=264 width=104) (actual time=5,922.428..5,922.541 rows=596 loops=1)

  • Sort Key: lookup.county
  • Sort Method: quicksort Memory: 88kB
3. 22.981 5,921.945 ↓ 2.3 596 1

Hash Right Join (cost=19,677.57..20,951.76 rows=264 width=104) (actual time=5,893.802..5,921.945 rows=596 loops=1)

  • Hash Cond: ((lookup.zip)::text = (orders.billing_address ->> 'zip'::text))
4. 8.382 8.382 ↑ 1.0 52,889 1

Seq Scan on _us_zip_county_lookup lookup (cost=0.00..874.89 rows=52,889 width=19) (actual time=0.017..8.382 rows=52,889 loops=1)

5. 6.876 5,890.582 ↓ 544.0 544 1

Hash (cost=19,677.55..19,677.55 rows=1 width=89) (actual time=5,890.581..5,890.582 rows=544 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 43kB
6. 5,883.706 5,883.706 ↓ 544.0 544 1

Index Scan using orders_document_storage_created_at_date_index on orders_document_storage orders (cost=0.44..19,677.55 rows=1 width=89) (actual time=1.392..5,883.706 rows=544 loops=1)

  • Index Cond: (((created_at)::date >= (('now'::cstring)::date - 10)) AND ((created_at)::date <= ('now'::cstring)::date))
  • Filter: (((billing_address ->> 'country_code'::text) = 'US'::text) AND ((billing_address ->> 'province_code'::text) = 'FL'::text))
  • Rows Removed by Filter: 11082
Planning time : 3.578 ms
Execution time : 5,931.155 ms