explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4jWU

Settings
# exclusive inclusive rows x rows loops node
1. 25.394 1,144.369 ↓ 5.9 60,802 1

HashAggregate (cost=636,916.91..637,020.74 rows=10,383 width=16) (actual time=1,135.591..1,144.369 rows=60,802 loops=1)

  • Group Key: clip.id
2. 4.227 1,118.975 ↓ 5.9 60,802 1

Append (cost=13,548.88..636,890.95 rows=10,383 width=16) (actual time=1,077.753..1,118.975 rows=60,802 loops=1)

3. 6.496 65.097 ↓ 0.0 0 1

Bitmap Heap Scan on clip (cost=13,548.88..29,407.73 rows=3,753 width=16) (actual time=65.097..65.097 rows=0 loops=1)

  • Recheck Cond: (((to_tsvector('simple'::regconfig, ((COALESCE(title, ''::text) || ' '::text) || COALESCE(description, ''::text))) @@ '''restaurant'''::tsquery) OR (to_tsvector('english'::regconfig, ((COALESCE(title, ''::text) || ' '::text) || COALESCE(description, ''::text))) @@ '''restaur'''::tsquery)) AND (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid))
  • Rows Removed by Index Recheck: 58
  • Heap Blocks: exact=56
4. 0.729 58.601 ↓ 0.0 0 1

BitmapAnd (cost=13,548.88..13,548.88 rows=3,762 width=0) (actual time=58.601..58.601 rows=0 loops=1)

5. 0.002 1.205 ↓ 0.0 0 1

BitmapOr (cost=453.47..453.47 rows=33,013 width=0) (actual time=1.205..1.205 rows=0 loops=1)

6. 0.539 0.539 ↑ 10.2 1,623 1

Bitmap Index Scan on clip_title_description_simple_idx (cost=0.00..223.80 rows=16,506 width=0) (actual time=0.539..0.539 rows=1,623 loops=1)

  • Index Cond: (to_tsvector('simple'::regconfig, ((COALESCE(title, ''::text) || ' '::text) || COALESCE(description, ''::text))) @@ '''restaurant'''::tsquery)
7. 0.664 0.664 ↑ 5.7 2,896 1

Bitmap Index Scan on clip_title_description_english_idx (cost=0.00..227.80 rows=16,506 width=0) (actual time=0.664..0.664 rows=2,896 loops=1)

  • Index Cond: (to_tsvector('english'::regconfig, ((COALESCE(title, ''::text) || ' '::text) || COALESCE(description, ''::text))) @@ '''restaur'''::tsquery)
8. 56.667 56.667 ↓ 1.0 377,031 1

Bitmap Index Scan on clip_workspace_id_index (cost=0.00..13,094.22 rows=376,238 width=0) (actual time=56.667..56.667 rows=377,031 loops=1)

  • Index Cond: (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid)
9. 0.012 15.549 ↓ 0.0 0 1

Hash Join (cost=15,462.79..421,906.13 rows=1,864 width=16) (actual time=15.549..15.549 rows=0 loops=1)

  • Hash Cond: (clip_1.account_id = account.id)
10. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on clip clip_1 (cost=13,188.27..418,202.09 rows=376,238 width=32) (never executed)

  • Recheck Cond: (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid)
11. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on clip_workspace_id_index (cost=0.00..13,094.22 rows=376,238 width=0) (never executed)

  • Index Cond: (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid)
12. 0.000 15.537 ↓ 0.0 0 1

Hash (cost=2,274.03..2,274.03 rows=39 width=16) (actual time=15.537..15.537 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
13. 15.537 15.537 ↓ 0.0 0 1

Seq Scan on account (cost=0.00..2,274.03 rows=39 width=16) (actual time=15.537..15.537 rows=0 loops=1)

  • Filter: (to_tsvector('simple'::regconfig, ((COALESCE(first_name, ''::text) || ' '::text) || COALESCE(last_name, ''::text))) @@ '''restaurant'''::tsquery)
  • Rows Removed by Filter: 7876
14. 105.498 983.126 ↓ 0.0 0 1

Nested Loop (cost=840.44..75,102.20 rows=2,473 width=16) (actual time=983.126..983.126 rows=0 loops=1)

15. 250.513 387.644 ↓ 7.5 163,328 1

Hash Join (cost=840.01..48,899.64 rows=21,701 width=16) (actual time=2.785..387.644 rows=163,328 loops=1)

  • Hash Cond: (clip_tag.tag_id = tag.id)
16. 136.953 136.953 ↓ 1.0 2,183,893 1

Seq Scan on clip_tag (cost=0.00..39,692.81 rows=2,173,281 width=32) (actual time=0.003..136.953 rows=2,183,893 loops=1)

17. 0.025 0.178 ↑ 3.1 112 1

Hash (cost=835.72..835.72 rows=343 width=16) (actual time=0.178..0.178 rows=112 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
18. 0.103 0.153 ↑ 3.1 112 1

Bitmap Heap Scan on tag (cost=26.75..835.72 rows=343 width=16) (actual time=0.062..0.153 rows=112 loops=1)

  • Recheck Cond: ((to_tsvector('simple'::regconfig, COALESCE(label, ''::text)) @@ '''restaurant'''::tsquery) OR (to_tsvector('english'::regconfig, COALESCE(label, ''::text)) @@ '''restaur'''::tsquery))
  • Heap Blocks: exact=86
19. 0.000 0.050 ↓ 0.0 0 1

BitmapOr (cost=26.75..26.75 rows=344 width=0) (actual time=0.050..0.050 rows=0 loops=1)

20. 0.028 0.028 ↑ 2.1 82 1

Bitmap Index Scan on tag_label_simple_idx (cost=0.00..13.29 rows=172 width=0) (actual time=0.028..0.028 rows=82 loops=1)

  • Index Cond: (to_tsvector('simple'::regconfig, COALESCE(label, ''::text)) @@ '''restaurant'''::tsquery)
21. 0.022 0.022 ↑ 1.5 112 1

Bitmap Index Scan on tag_label_english_idx (cost=0.00..13.29 rows=172 width=0) (actual time=0.022..0.022 rows=112 loops=1)

  • Index Cond: (to_tsvector('english'::regconfig, COALESCE(label, ''::text)) @@ '''restaur'''::tsquery)
22. 489.984 489.984 ↓ 0.0 0 163,328

Index Scan using clip_pkey on clip clip_2 (cost=0.43..1.20 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=163,328)

  • Index Cond: (id = clip_tag.clip_id)
  • Filter: (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid)
  • Rows Removed by Filter: 1
23. 6.080 50.976 ↓ 26.5 60,802 1

Nested Loop (cost=409.02..110,371.05 rows=2,293 width=16) (actual time=13.978..50.976 rows=60,802 loops=1)

24. 0.008 0.668 ↑ 18.0 1 1

Bitmap Heap Scan on smart_tag (cost=362.07..437.61 rows=18 width=16) (actual time=0.667..0.668 rows=1 loops=1)

  • Recheck Cond: (((to_tsvector('simple'::regconfig, COALESCE(label, ''::text)) @@ '''restaurant'''::tsquery) OR (to_tsvector('english'::regconfig, COALESCE(label, ''::text)) @@ '''restaur'''::tsquery)) AND (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid))
  • Heap Blocks: exact=1
25. 0.015 0.660 ↓ 0.0 0 1

BitmapAnd (cost=362.07..362.07 rows=18 width=0) (actual time=0.660..0.660 rows=0 loops=1)

26. 0.009 0.236 ↓ 0.0 0 1

BitmapOr (cost=56.04..56.04 rows=1,071 width=0) (actual time=0.236..0.236 rows=0 loops=1)

27. 0.128 0.128 ↑ 3.1 175 1

Bitmap Index Scan on smart_tag_label_simple_idx (cost=0.00..28.02 rows=535 width=0) (actual time=0.128..0.128 rows=175 loops=1)

  • Index Cond: (to_tsvector('simple'::regconfig, COALESCE(label, ''::text)) @@ '''restaurant'''::tsquery)
28. 0.099 0.099 ↑ 3.1 175 1

Bitmap Index Scan on smart_tag_label_english_idx (cost=0.00..28.02 rows=535 width=0) (actual time=0.099..0.099 rows=175 loops=1)

  • Index Cond: (to_tsvector('english'::regconfig, COALESCE(label, ''::text)) @@ '''restaur'''::tsquery)
29. 0.409 0.409 ↑ 1.0 1,766 1

Bitmap Index Scan on smart_tag_workspace_id_label_key (cost=0.00..305.78 rows=1,781 width=0) (actual time=0.409..0.409 rows=1,766 loops=1)

  • Index Cond: (workspace_id = '1f32d99e-2062-43cb-b9a8-7ae13ab7c977'::uuid)
30. 34.907 44.228 ↓ 32.7 60,802 1

Bitmap Heap Scan on clip_smart_tag (cost=46.95..6,088.84 rows=1,857 width=32) (actual time=13.306..44.228 rows=60,802 loops=1)

  • Recheck Cond: (smart_tag_id = smart_tag.id)
  • Heap Blocks: exact=23146
31. 9.321 9.321 ↓ 32.7 60,802 1

Bitmap Index Scan on clip_smart_tag_id_index (cost=0.00..46.49 rows=1,857 width=0) (actual time=9.321..9.321 rows=60,802 loops=1)

  • Index Cond: (smart_tag_id = smart_tag.id)
Planning time : 1.170 ms