explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e0T6

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 17.720 ↑ 1.0 10 1

Limit (cost=119.82..160.86 rows=10 width=13) (actual time=17.628..17.720 rows=10 loops=1)

2. 0.007 17.718 ↑ 315.7 10 1

Nested Loop (cost=119.82..13,077.45 rows=3,157 width=13) (actual time=17.627..17.718 rows=10 loops=1)

3. 0.646 17.612 ↑ 482.6 11 1

Bitmap Heap Scan on contacts__aggregated_ft_only (cost=119.39..5,748.23 rows=5,309 width=13) (actual time=17.599..17.612 rows=11 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''owner'''::tsquery))
  • Heap Blocks: exact=11
4. 16.966 16.966 ↓ 1.2 6,131 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..118.06 rows=5,309 width=0) (actual time=16.966..16.966 rows=6,131 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''owner'''::tsquery))
5. 0.099 0.099 ↑ 1.0 1 11

Index Only Scan using ix_company_id_contact_type on contacts (cost=0.43..1.38 rows=1 width=13) (actual time=0.009..0.009 rows=1 loops=11)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_type = 'person'::text) AND (id = contacts__aggregated_ft_only.contact_id))
  • Filter: (id <> '\x5d0a3d180214265ce85dac40'::bytea)
  • Heap Fetches: 4
Planning time : 0.702 ms
Execution time : 17.883 ms