explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kd2A

Settings
# exclusive inclusive rows x rows loops node
1. 65.398 69.746 ↓ 0.0 0 1

Update on refund_rule (cost=12.34..927.12 rows=1,919 width=118) (actual time=69.746..69.746 rows=0 loops=1)

2. 1.085 4.348 ↓ 2.7 5,173 1

Nested Loop (cost=12.34..927.12 rows=1,919 width=118) (actual time=0.580..4.348 rows=5,173 loops=1)

3. 0.003 0.116 ↑ 1.0 1 1

Nested Loop (cost=12.34..623.52 rows=1 width=18) (actual time=0.111..0.116 rows=1 loops=1)

4. 0.005 0.083 ↓ 2.0 2 1

Nested Loop (cost=11.92..623.04 rows=1 width=16) (actual time=0.075..0.083 rows=2 loops=1)

5. 0.044 0.044 ↑ 1.0 1 1

Index Scan using idx_contract_number on client_contract cc (cost=0.55..2.77 rows=1 width=10) (actual time=0.041..0.044 rows=1 loops=1)

  • Index Cond: (number = 'ИМ1221784'::text)
6. 0.015 0.034 ↑ 351.5 2 1

Bitmap Heap Scan on contracts_sellers cs (cost=11.37..613.25 rows=703 width=14) (actual time=0.029..0.034 rows=2 loops=1)

  • Recheck Cond: ((contract_id)::integer = cc.id)
  • Heap Blocks: exact=2
7. 0.019 0.019 ↑ 351.5 2 1

Bitmap Index Scan on contracts_sellers_pkey (cost=0.00..11.19 rows=703 width=0) (actual time=0.019..0.019 rows=2 loops=1)

  • Index Cond: ((contract_id)::integer = cc.id)
8. 0.030 0.030 ↓ 0.0 0 2

Index Scan using seller_pkey on seller s (cost=0.42..0.48 rows=1 width=10) (actual time=0.015..0.015 rows=0 loops=2)

  • Index Cond: (id = (cs.seller_id)::integer)
9. 3.147 3.147 ↑ 1.0 5,173 1

Seq Scan on refund_rule (cost=0.00..250.80 rows=5,280 width=68) (actual time=0.465..3.147 rows=5,173 loops=1)

Planning time : 1.973 ms
Execution time : 69.846 ms