explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8jgB

Settings
# exclusive inclusive rows x rows loops node
1. 128.099 36,585.720 ↑ 6.1 16,968 1

HashAggregate (cost=2,077,933.77..2,078,973.09 rows=103,932 width=12) (actual time=36,579.783..36,585.720 rows=16,968 loops=1)

  • Group Key: store_settings.store_id
2. 9,633.060 36,457.621 ↑ 8.1 201,369 1

Hash Join (cost=322,738.53..2,069,810.09 rows=1,624,736 width=12) (actual time=10,817.522..36,457.621 rows=201,369 loops=1)

  • Hash Cond: (transaction.customer_pay_id = customer_pay.id)
3. 16,009.897 16,009.897 ↓ 1.0 25,741,864 1

Seq Scan on transaction (cost=0.00..1,384,319.39 rows=25,451,685 width=12) (actual time=0.026..16,009.897 rows=25,741,864 loops=1)

  • Filter: ((is_test IS FALSE) AND (result = 2))
  • Rows Removed by Filter: 15015917
4. 33.326 10,814.664 ↑ 11.5 44,550 1

Hash (cost=313,807.74..313,807.74 rows=513,743 width=16) (actual time=10,814.664..10,814.664 rows=44,550 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 1047kB
5. 4,216.248 10,781.338 ↑ 11.5 44,550 1

Hash Join (cost=12,322.47..313,807.74 rows=513,743 width=16) (actual time=547.957..10,781.338 rows=44,550 loops=1)

  • Hash Cond: (customer_pay.customer_id = store_settings.customer_id)
6. 6,018.066 6,018.066 ↓ 1.0 8,027,512 1

Seq Scan on customer_pay (cost=0.00..216,236.92 rows=8,011,092 width=16) (actual time=0.775..6,018.066 rows=8,027,512 loops=1)

7. 36.991 547.024 ↑ 1.0 103,909 1

Hash (cost=11,023.32..11,023.32 rows=103,932 width=16) (actual time=547.024..547.024 rows=103,909 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4871kB
8. 510.033 510.033 ↓ 1.0 103,939 1

Seq Scan on store_settings (cost=0.00..11,023.32 rows=103,932 width=16) (actual time=0.657..510.033 rows=103,939 loops=1)

Planning time : 1.854 ms
Execution time : 36,590.280 ms