explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kmbm

Settings
# exclusive inclusive rows x rows loops node
1. 17.380 528.038 ↑ 1.6 8,609 1

Unique (cost=9,113.85..9,877.86 rows=13,891 width=162) (actual time=509.030..528.038 rows=8,609 loops=1)

2. 192.231 510.658 ↓ 1.1 15,012 1

Sort (cost=9,113.85..9,148.58 rows=13,891 width=162) (actual time=509.027..510.658 rows=15,012 loops=1)

  • Sort Key: aa.total_sales_price, aa.id, aa.type, aa.cashregister_code, aa.employee_name, aa.branch_code, aa.branch_name, aa.transaction_id, aa.change_due, aa.start_action_date, aa.end_action_date, aa.total_rebate_price, bb.paidamount, bb.type, cc.ba (...)
  • Sort Method: quicksort Memory: 4372kB
3. 17.065 318.427 ↓ 1.1 15,012 1

Hash Right Join (cost=6,827.21..8,158.02 rows=13,891 width=162) (actual time=297.363..318.427 rows=15,012 loops=1)

  • Hash Cond: (bb.salestransaction_id = aa.id)
4. 4.031 4.031 ↑ 1.0 44,660 1

Seq Scan on salestransactionpayment bb (cost=0.00..968.60 rows=44,660 width=53) (actual time=0.004..4.031 rows=44,660 loops=1)

5. 5.972 297.331 ↓ 1.0 9,066 1

Hash (cost=6,716.17..6,716.17 rows=8,883 width=151) (actual time=297.331..297.331 rows=9,066 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1694kB
6. 10.087 291.359 ↓ 1.0 9,066 1

Hash Join (cost=1,391.33..6,716.17 rows=8,883 width=151) (actual time=15.673..291.359 rows=9,066 loops=1)

  • Hash Cond: (cc.salestransaction_id = aa.id)
7. 265.676 265.676 ↓ 1.0 9,066 1

Seq Scan on salestransactionstep cc (cost=0.00..5,136.06 rows=8,885 width=80) (actual time=0.050..265.676 rows=9,066 loops=1)

  • Filter: (product_name ~~* 'BUYUK SECIM'::text)
  • Rows Removed by Filter: 176219
8. 8.620 15.596 ↓ 1.0 28,560 1

Hash (cost=1,034.40..1,034.40 rows=28,554 width=113) (actual time=15.596..15.596 rows=28,560 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 4219kB
9. 6.976 6.976 ↓ 1.0 28,560 1

Seq Scan on salestransaction aa (cost=0.00..1,034.40 rows=28,554 width=113) (actual time=0.008..6.976 rows=28,560 loops=1)

  • Filter: ((start_action_date > '2018-01-04 21:00:00'::timestamp without time zone) AND (start_action_date < '2019-09-05 20:59:59'::timestamp without time zone))
Planning time : 2.859 ms
Execution time : 531.799 ms