explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i0mc

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 5,410.401 ↑ 4.9 41 1

Sort (cost=10,000,919,146.55..10,000,919,147.05 rows=200 width=16) (actual time=5,410.397..5,410.401 rows=41 loops=1)

  • Sort Key: (count(*)) DESC, c_orders.c_count DESC
  • Sort Method: quicksort Memory: 26kB
2. 23.164 5,410.382 ↑ 4.9 41 1

GroupAggregate (cost=10,000,916,886.9..10,000,919,138.9 rows=200 width=16) (actual time=5,360.164..5,410.382 rows=41 loops=1)

  • Group Key: c_orders.c_count
3. 88.309 5,387.218 ↑ 1.0 300,000 1

Sort (cost=10,000,916,886.9..10,000,917,636.9 rows=300,000 width=8) (actual time=5,360.157..5,387.218 rows=300,000 loops=1)

  • Sort Key: c_orders.c_count DESC
  • Sort Method: external merge Disk: 5,320kB
4. 24.670 5,298.909 ↑ 1.0 300,000 1

Subquery Scan on c_orders (cost=10,000,857,220.27..10,000,885,493 rows=300,000 width=8) (actual time=4,672.707..5,298.909 rows=300,000 loops=1)

5. 308.431 5,274.239 ↑ 1.0 300,000 1

GroupAggregate (cost=10,000,857,220.27..10,000,882,493 rows=300,000 width=12) (actual time=4,672.706..5,274.239 rows=300,000 loops=1)

  • Group Key: customer.c_custkey
6. 953.428 4,965.808 ↓ 1.0 3,067,850 1

Sort (cost=10,000,857,220.27..10,000,864,644.51 rows=2,969,697 width=8) (actual time=4,672.695..4,965.808 rows=3,067,850 loops=1)

  • Sort Key: customer.c_custkey
  • Sort Method: external merge Disk: 53,664kB
7. 937.395 4,012.380 ↓ 1.0 3,067,850 1

Hash Join (cost=10,000,015,091.56..10,000,456,742.86 rows=2,969,697 width=8) (actual time=99.748..4,012.38 rows=3,067,850 loops=1)

8. 2,975.494 2,975.494 ↑ 1.0 2,967,848 1

Index Scan using orders_ckey_comm on orders orders (cost=0.56..376,444.53 rows=2,969,697 width=8) (actual time=0.04..2,975.494 rows=2,967,848 loops=1)

  • Filter: ((o_comment)::text !~~ '%pending%packages%'::text)
9. 54.744 99.491 ↑ 1.0 300,000 1

Hash (cost=10,000,010,169..10,000,010,169 rows=300,000 width=4) (actual time=99.49..99.491 rows=300,000 loops=1)

10. 44.747 44.747 ↑ 1.0 300,000 1

Seq Scan on customer customer (cost=10,000,000,000..10,000,010,169 rows=300,000 width=4) (actual time=0.009..44.747 rows=300,000 loops=1)

Planning time : 0.308 ms
Execution time : 5,419.463 ms