explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NqQy : Optimization for: prod_poslije_prod_2; plan #Kloi

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.003 6.738 ↑ 5.5 2 1

Nested Loop Left Join (cost=4,109.78..4,301.81 rows=11 width=182) (actual time=6.720..6.738 rows=2 loops=1)

2. 0.002 6.729 ↑ 5.5 2 1

Nested Loop Left Join (cost=4,109.35..4,294.66 rows=11 width=175) (actual time=6.714..6.729 rows=2 loops=1)

3. 0.004 6.701 ↑ 5.5 2 1

Nested Loop Left Join (cost=4,108.92..4,201.57 rows=11 width=167) (actual time=6.693..6.701 rows=2 loops=1)

4. 0.001 6.683 ↑ 5.5 2 1

Limit (cost=4,108.49..4,108.51 rows=11 width=141) (actual time=6.682..6.683 rows=2 loops=1)

5. 0.015 6.682 ↑ 74.5 2 1

Sort (cost=4,108.49..4,108.86 rows=149 width=141) (actual time=6.682..6.682 rows=2 loops=1)

  • Sort Key: account.id
  • Sort Method: quicksort Memory: 25kB
6. 0.003 6.667 ↑ 74.5 2 1

Nested Loop (cost=3,910.16..4,105.16 rows=149 width=141) (actual time=6.639..6.667 rows=2 loops=1)

7. 0.010 6.622 ↑ 98.7 3 1

HashAggregate (cost=3,909.73..3,912.69 rows=296 width=11) (actual time=6.619..6.622 rows=3 loops=1)

  • Group Key: (cmap_1.account_id)::text
8. 0.005 6.612 ↑ 49.3 6 1

Nested Loop (cost=266.73..3,908.99 rows=296 width=11) (actual time=6.593..6.612 rows=6 loops=1)

9. 0.022 6.589 ↑ 49.5 6 1

Bitmap Heap Scan on acccontact contact_1 (cost=266.30..1,405.11 rows=297 width=8) (actual time=6.580..6.589 rows=6 loops=1)

  • Recheck Cond: ((identificationno)::text ~~* '%1448285704%'::text)
  • Heap Blocks: exact=3
10. 6.567 6.567 ↑ 49.5 6 1

Bitmap Index Scan on trgm_idx_acccontact_identificationno (cost=0.00..266.23 rows=297 width=0) (actual time=6.567..6.567 rows=6 loops=1)

  • Index Cond: ((identificationno)::text ~~* '%1448285704%'::text)
11. 0.018 0.018 ↑ 1.0 1 6

Index Scan using acccontactmap_acccontact_fk_i on acccontactmap cmap_1 (cost=0.43..8.42 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=6)

  • Index Cond: (contact_id = contact_1.id)
12. 0.042 0.042 ↑ 1.0 1 3

Index Scan using account_pkey on account (cost=0.43..0.65 rows=1 width=141) (actual time=0.014..0.014 rows=1 loops=3)

  • Index Cond: ((id)::text = (cmap_1.account_id)::text)
  • Filter: ((accountclass_code)::text = 'CP'::text)
  • Rows Removed by Filter: 0
13. 0.014 0.014 ↑ 1.0 1 2

Index Scan using account_pkey on account customer (cost=0.43..8.45 rows=1 width=37) (actual time=0.007..0.007 rows=1 loops=2)

  • Index Cond: ((id)::text = (account.enterprise_id)::text)
  • Filter: ((accountclass_code)::text = 'CA'::text)
14. 0.026 0.026 ↑ 1.0 1 2

Index Scan using acccontactmap_account_fk_i on acccontactmap cmap (cost=0.43..8.45 rows=1 width=19) (actual time=0.012..0.013 rows=1 loops=2)

  • Index Cond: ((account_id)::text = (account.enterprise_id)::text)
  • Filter: (((status)::text = 'ACTIVE'::text) AND ((croletype_code)::text = 'CUSTOMER_INFO'::text))
  • Rows Removed by Filter: 1
15. 0.006 0.006 ↑ 1.0 1 2

Index Scan using acccontact_pkey on acccontact contact (cost=0.43..0.65 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: (id = cmap.contact_id)
Planning time : 1.143 ms
Execution time : 6.913 ms