explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oteA

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 442.630 ↑ 1.0 10 1

Limit (cost=90.43..24,565.60 rows=10 width=13) (actual time=320.775..442.630 rows=10 loops=1)

2. 140.491 442.623 ↑ 36,276.4 10 1

Nested Loop Semi Join (cost=90.43..887,871,139.47 rows=362,764 width=13) (actual time=320.774..442.623 rows=10 loops=1)

  • Join Filter: (contacts.id = contacts__aggregated_ft_only.contact_id)
  • Rows Removed by Join Filter: 1,988,685
3. 0.155 0.155 ↑ 25,018.2 29 1

Index Only Scan using ix_company_id_contact_type on contacts (cost=0.43..24,924.58 rows=725,527 width=13) (actual time=0.048..0.155 rows=29 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_type = 'person'::text))
  • Filter: (id <> '\x5d0a3d180214265ce85dac40'::bytea)
  • Heap Fetches: 13
4. 72.133 301.977 ↑ 1.2 68,576 29

Materialize (cost=90.00..84,326.36 rows=81,574 width=13) (actual time=0.399..10.413 rows=68,576 loops=29)

5. 3.131 229.844 ↓ 1.1 89,435 1

Append (cost=90.00..83,918.49 rows=81,574 width=13) (actual time=11.554..229.844 rows=89,435 loops=1)

6. 1.883 13.260 ↑ 1.0 2,929 1

Bitmap Heap Scan on contacts__aggregated_ft_only (cost=90.00..3,334.68 rows=3,004 width=13) (actual time=11.554..13.260 rows=2,929 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''cmo'''::tsquery))
  • Heap Blocks: exact=1,745
7. 11.377 11.377 ↑ 1.0 2,929 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..89.25 rows=3,004 width=0) (actual time=11.377..11.377 rows=2,929 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''cmo'''::tsquery))
8. 16.144 37.184 ↓ 1.0 17,822 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_1 (cost=275.42..17,009.74 rows=17,115 width=13) (actual time=22.698..37.184 rows=17,822 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''director'''::tsquery))
  • Heap Blocks: exact=12,767
9. 21.040 21.040 ↓ 1.0 17,822 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..271.14 rows=17,115 width=0) (actual time=21.040..21.040 rows=17,822 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''director'''::tsquery))
10. 20.848 47.635 ↓ 1.1 24,784 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_2 (cost=343.97..21,478.45 rows=22,319 width=13) (actual time=29.613..47.635 rows=24,784 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''founder'''::tsquery))
  • Heap Blocks: exact=15,842
11. 26.787 26.787 ↓ 1.1 24,784 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..338.39 rows=22,319 width=0) (actual time=26.786..26.787 rows=24,784 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''founder'''::tsquery))
12. 12.480 30.332 ↓ 1.1 15,390 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_3 (cost=237.80..14,430.07 rows=14,251 width=13) (actual time=19.327..30.332 rows=15,390 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''ceo'''::tsquery))
  • Heap Blocks: exact=11,311
13. 17.852 17.852 ↓ 1.1 15,390 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..234.23 rows=14,251 width=0) (actual time=17.851..17.852 rows=15,390 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''ceo'''::tsquery))
14. 2.188 13.878 ↓ 79.9 2,718 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_4 (cost=55.44..93.37 rows=34 width=13) (actual time=11.945..13.878 rows=2,718 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''vice'' & ''president'''::tsquery))
  • Heap Blocks: exact=2,383
15. 11.690 11.690 ↓ 79.9 2,718 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..55.43 rows=34 width=0) (actual time=11.690..11.690 rows=2,718 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''vice'' & ''president'''::tsquery))
16. 4.414 17.392 ↓ 1.0 5,047 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_5 (cost=113.60..5,279.18 rows=4,855 width=13) (actual time=13.460..17.392 rows=5,047 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''vp'''::tsquery))
  • Heap Blocks: exact=4,334
17. 12.978 12.978 ↓ 1.0 5,047 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..112.39 rows=4,855 width=0) (actual time=12.978..12.978 rows=5,047 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''vp'''::tsquery))
18. 5.826 18.608 ↓ 1.2 6,131 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_6 (cost=119.39..5,748.23 rows=5,309 width=13) (actual time=13.506..18.608 rows=6,131 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''owner'''::tsquery))
  • Heap Blocks: exact=5,362
19. 12.782 12.782 ↓ 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=12.782..12.782 rows=6,131 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''owner'''::tsquery))
20. 6.493 21.289 ↓ 1.3 7,173 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_7 (cost=119.84..5,784.36 rows=5,344 width=13) (actual time=15.525..21.289 rows=7,173 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''seo'''::tsquery))
  • Heap Blocks: exact=5,552
21. 14.796 14.796 ↓ 1.3 7,173 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..118.50 rows=5,344 width=0) (actual time=14.796..14.796 rows=7,173 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''seo'''::tsquery))
22. 7.272 22.474 ↑ 1.2 7,257 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_8 (cost=163.45..9,055.59 rows=8,592 width=13) (actual time=15.965..22.474 rows=7,257 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''president'''::tsquery))
  • Heap Blocks: exact=5,962
23. 15.202 15.202 ↑ 1.2 7,257 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..161.30 rows=8,592 width=0) (actual time=15.202..15.202 rows=7,257 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''president'''::tsquery))
24. 0.188 4.661 ↑ 4.1 184 1

Bitmap Heap Scan on contacts__aggregated_ft_only contacts__aggregated_ft_only_9 (cost=60.17..889.09 rows=751 width=13) (actual time=4.491..4.661 rows=184 loops=1)

  • Recheck Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''cxo'''::tsquery))
  • Heap Blocks: exact=180
25. 4.473 4.473 ↑ 4.1 184 1

Bitmap Index Scan on ft_ix_contacts__aggregated_ft_only_company_id_field_name_value (cost=0.00..59.99 rows=751 width=0) (actual time=4.473..4.473 rows=184 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (field_name = '__any'::text) AND (value @@ '''cxo'''::tsquery))
Planning time : 1.702 ms
Execution time : 446.410 ms