explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Am0G

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 380.636 ↑ 1.0 5 1

Limit (cost=476.46..15,884.78 rows=5 width=66) (actual time=66.483..380.636 rows=5 loops=1)

2. 352.431 380.627 ↑ 1,583.4 5 1

Bitmap Heap Scan on contactsforrecommendations cfr (cost=476.46..24,398,008.07 rows=7,917 width=66) (actual time=66.483..380.627 rows=5 loops=1)

  • Recheck Cond: ((lower(companyname) = 'appneta'::text) OR ((companyname % 'appneta'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'llc'::text) OR ((companyname % 'llc'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'cti group'::text) OR ((companyname % 'cti group'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'weblineindia'::text) OR ((companyname % 'weblineindia'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'tpf software'::text) OR ((companyname % 'tpf software'::text) AND (length(companyname) > 4)))
  • Rows Removed by Index Recheck: 16128
  • Filter: (((lower(companyname) = 'appneta'::text) OR ((length(companyname) > 4) AND (companyname % 'appneta'::text)) OR (lower(companyname) = 'llc'::text) OR ((length(companyname) > 4) AND (companyname % 'llc'::text)) OR (lower(companyname) = 'cti group'::text) OR ((length(companyname) > 4) AND (companyname % 'cti group'::text)) OR (lower(companyname) = 'weblineindia'::text) OR ((length(companyname) > 4) AND (companyname % 'weblineindia'::text)) OR (lower(companyname) = 'tpf software'::text) OR ((length(companyname) > 4) AND (companyname % 'tpf software'::text))) AND (NOT (SubPlan 1)))
  • Heap Blocks: exact=4498
3. 0.006 23.426 ↓ 0.0 0 1

BitmapOr (cost=476.46..476.46 rows=16,008 width=0) (actual time=23.426..23.426 rows=0 loops=1)

4. 0.020 0.020 ↑ 500.2 6 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.020..0.020 rows=6 loops=1)

  • Index Cond: (lower(companyname) = 'appneta'::text)
5. 1.396 1.396 ↑ 33.3 6 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..40.50 rows=200 width=0) (actual time=1.396..1.396 rows=6 loops=1)

  • Index Cond: (companyname % 'appneta'::text)
6. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (lower(companyname) = 'llc'::text)
7. 8.605 8.605 ↓ 123.6 24,726 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..21.00 rows=200 width=0) (actual time=8.605..8.605 rows=24,726 loops=1)

  • Index Cond: (companyname % 'llc'::text)
8. 0.021 0.021 ↑ 3,001.0 1 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: (lower(companyname) = 'cti group'::text)
9. 7.098 7.098 ↑ 1.1 177 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..49.50 rows=200 width=0) (actual time=7.098..7.098 rows=177 loops=1)

  • Index Cond: (companyname % 'cti group'::text)
10. 0.020 0.020 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.020..0.020 rows=0 loops=1)

  • Index Cond: (lower(companyname) = 'weblineindia'::text)
11. 2.796 2.796 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..63.00 rows=200 width=0) (actual time=2.796..2.796 rows=0 loops=1)

  • Index Cond: (companyname % 'weblineindia'::text)
12. 0.019 0.019 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: (lower(companyname) = 'tpf software'::text)
13. 3.428 3.428 ↑ 200.0 1 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..63.00 rows=200 width=0) (actual time=3.428..3.428 rows=1 loops=1)

  • Index Cond: (companyname % 'tpf software'::text)
14.          

SubPlan (for Bitmap Heap Scan)

15. 4.205 4.770 ↑ 1.0 1 5

Bitmap Heap Scan on usermycontactsforrecommdedupe ucmfrd (cost=24.75..3,022.34 rows=1 width=8) (actual time=0.801..0.954 rows=1 loops=5)

  • Recheck Cond: ((userid = '13670'::bigint) AND (firstname IS NOT NULL) AND (companyname IS NOT NULL))
  • Filter: ((firstname = cfr.firstname) AND (companyname = cfr.companyname) AND ((cfr.lastname IS NULL) OR (lower(cfr.lastname) = lower(lastname))))
  • Rows Removed by Filter: 490
  • Heap Blocks: exact=1910
16. 0.565 0.565 ↑ 4.2 491 5

Bitmap Index Scan on idx_usermycontactsforrecommdedupe_userid_names (cost=0.00..24.75 rows=2,042 width=0) (actual time=0.113..0.113 rows=491 loops=5)

  • Index Cond: (userid = '13670'::bigint)
Planning time : 0.280 ms
Execution time : 380.950 ms