explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HqJI

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 2,245.095 ↑ 1.0 100 1

Limit (cost=50,062.65..50,062.90 rows=100 width=140) (actual time=2,245.076..2,245.095 rows=100 loops=1)

2. 38.681 2,245.086 ↑ 2,929.0 100 1

Sort (cost=50,062.65..50,794.89 rows=292,897 width=140) (actual time=2,245.074..2,245.086 rows=100 loops=1)

  • Sort Key: main_order.datetime_action DESC
  • Sort Method: top-N heapsort Memory: 49kB
3. 1,991.127 2,206.405 ↓ 1.1 315,768 1

HashAggregate (cost=35,939.36..38,868.33 rows=292,897 width=140) (actual time=2,141.393..2,206.405 rows=315,768 loops=1)

  • Group Key: main_order.datetime_action, main_order.data
4. 141.998 215.278 ↓ 1.1 315,768 1

Hash Join (cost=73.50..34,474.88 rows=292,897 width=140) (actual time=0.521..215.278 rows=315,768 loops=1)

  • Hash Cond: (main_order.site_id = main_site.id)
5. 72.795 72.795 ↓ 1.0 318,996 1

Seq Scan on main_order (cost=0.00..33,556.78 rows=318,990 width=144) (actual time=0.009..72.795 rows=318,996 loops=1)

  • Filter: (id >= 606619)
  • Rows Removed by Filter: 5466
6. 0.152 0.485 ↓ 1.0 455 1

Hash (cost=67.89..67.89 rows=449 width=4) (actual time=0.485..0.485 rows=455 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
7. 0.333 0.333 ↓ 1.0 455 1

Seq Scan on main_site (cost=0.00..67.89 rows=449 width=4) (actual time=0.009..0.333 rows=455 loops=1)

  • Filter: is_active
  • Rows Removed by Filter: 40
Planning time : 0.674 ms
Execution time : 2,254.411 ms