explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MGqdK

Settings
# exclusive inclusive rows x rows loops node
1. 0.583 799.658 ↑ 1.0 200 1

Limit (cost=122,214.11..122,214.61 rows=200 width=64) (actual time=799.069..799.658 rows=200 loops=1)

2. 36.273 799.075 ↑ 1,904.4 200 1

Sort (cost=122,214.11..123,166.32 rows=380,884 width=64) (actual time=799.067..799.075 rows=200 loops=1)

  • Sort Key: "m"."weight" DESC
  • Sort Method: top-N heapsort Memory: 49kB
3. 101.206 762.802 ↑ 2.0 194,776 1

Hash Join (cost=79,374.70..105,752.58 rows=380,884 width=64) (actual time=441.554..762.802 rows=194,776 loops=1)

  • Hash Cond: ("e"."asset" = "m"."asset")
4. 46.923 222.596 ↑ 1.0 375,570 1

Hash Left Join (cost=4,979.24..28,466.80 rows=375,571 width=68) (actual time=2.143..222.596 rows=375,570 loops=1)

  • Hash Cond: ("e"."id" = "l"."id")
5. 46.215 174.662 ↑ 1.0 375,570 1

Hash Left Join (cost=4,714.25..26,791.47 rows=375,571 width=52) (actual time=1.126..174.662 rows=375,570 loops=1)

  • Hash Cond: ("e"."id" = "s"."svod")
6. 23.243 127.347 ↑ 1.0 375,570 1

Append (cost=0.00..20,661.56 rows=375,571 width=36) (actual time=0.016..127.347 rows=375,570 loops=1)

7. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on "entitlements" "e" (cost=0.00..0.00 rows=1 width=36) (actual time=0.004..0.004 rows=0 loops=1)

8. 3.938 3.938 ↑ 1.0 13,264 1

Seq Scan on "tvod" "e_1" (cost=0.00..709.64 rows=13,264 width=36) (actual time=0.011..3.938 rows=13,264 loops=1)

9. 44.828 44.828 ↑ 1.0 160,838 1

Seq Scan on "svod" "e_2" (cost=0.00..8,310.38 rows=160,838 width=36) (actual time=0.010..44.828 rows=160,838 loops=1)

10. 55.334 55.334 ↑ 1.0 201,468 1

Seq Scan on "linear" "e_3" (cost=0.00..9,763.68 rows=201,468 width=36) (actual time=0.010..55.334 rows=201,468 loops=1)

11. 0.001 1.100 ↓ 0.0 0 1

Hash (cost=4,705.16..4,705.16 rows=727 width=32) (actual time=1.099..1.100 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
12. 0.001 1.099 ↓ 0.0 0 1

Nested Loop (cost=63.18..4,705.16 rows=727 width=32) (actual time=1.099..1.099 rows=0 loops=1)

13. 0.001 1.098 ↓ 0.0 0 1

HashAggregate (cost=62.76..62.77 rows=1 width=16) (actual time=1.098..1.098 rows=0 loops=1)

  • Group Key: "x_1"."channel
14. 1.097 1.097 ↓ 0.0 0 1

Seq Scan on "allowed_channels" "x_1" (cost=0.00..62.76 rows=1 width=16) (actual time=1.097..1.097 rows=0 loops=1)

  • Filter: (("subscription_packs" && '{c1e7a931-a68b-4e0f-9f09-e575c4ff9ea8}'::"uuid"[]) AND (("allowed_timezones" && '{-0700}'::"text"[]) OR ("allowed_timezones" IS NULL)) AND (("allowed_dmas" && '{770}'::integer[]) OR ("allowed_dmas" IS NULL)) AND (NOT ("restricted_devices" && '{browser}'::"text"[])))
  • Rows Removed by Filter: 1138
15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "svod_channels_pkey" on "svod_channels" "s" (cost=0.42..4,635.12 rows=727 width=32) (never executed)

  • Index Cond: ("channel" = "x_1"."channel")
  • Heap Fetches: 0
16. 0.001 1.011 ↓ 0.0 0 1

Hash (cost=262.55..262.55 rows=195 width=32) (actual time=1.011..1.011 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
17. 0.000 1.010 ↓ 0.0 0 1

Nested Loop (cost=63.18..262.55 rows=195 width=32) (actual time=1.010..1.010 rows=0 loops=1)

18. 0.001 1.010 ↓ 0.0 0 1

HashAggregate (cost=62.76..62.77 rows=1 width=16) (actual time=1.010..1.010 rows=0 loops=1)

  • Group Key: "x"."channel
19. 1.009 1.009 ↓ 0.0 0 1

Seq Scan on "allowed_channels" "x" (cost=0.00..62.76 rows=1 width=16) (actual time=1.009..1.009 rows=0 loops=1)

  • Filter: (("subscription_packs" && '{c1e7a931-a68b-4e0f-9f09-e575c4ff9ea8}'::"uuid"[]) AND (("allowed_timezones" && '{-0700}'::"text"[]) OR ("allowed_timezones" IS NULL)) AND (("allowed_dmas" && '{770}'::integer[]) OR ("allowed_dmas" IS NULL)) AND (NOT ("restricted_devices" && '{browser}'::"text"[])))
  • Rows Removed by Filter: 1138
20. 0.000 0.000 ↓ 0.0 0

Index Scan using "linear_channel_idx" on "linear" "l" (cost=0.42..197.83 rows=195 width=32) (never executed)

  • Index Cond: ("channel" = "x"."channel")
21. 28.110 439.000 ↑ 1.1 134,307 1

Hash (cost=72,474.96..72,474.96 rows=153,640 width=48) (actual time=439.000..439.000 rows=134,307 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 9006kB
22. 11.252 410.890 ↑ 1.1 134,307 1

Subquery Scan on m (cost=69,018.06..72,474.96 rows=153,640 width=48) (actual time=332.174..410.890 rows=134,307 loops=1)

23. 195.001 399.638 ↑ 1.1 134,307 1

Finalize HashAggregate (cost=69,018.06..70,938.56 rows=153,640 width=48) (actual time=332.172..399.638 rows=134,307 loops=1)

  • Group Key: "m_1"."asset
24. 31.114 204.637 ↑ 1.2 175,927 1

Gather (cost=45,471.13..67,465.52 rows=207,006 width=48) (actual time=139.653..204.637 rows=175,927 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
25. 74.514 173.523 ↑ 1.8 58,642 3

Partial HashAggregate (cost=44,471.13..45,764.92 rows=103,503 width=48) (actual time=134.851..173.523 rows=58,642 loops=3)

  • Group Key: "m_1"."asset
26. 17.837 99.009 ↑ 1.3 80,375 3

Hash Join (cost=2,074.78..43,953.61 rows=103,503 width=28) (actual time=45.131..99.009 rows=80,375 loops=3)

  • Hash Cond: ("m_1"."searchable_field" = "w"."searchable_field")
27. 34.991 81.148 ↑ 1.3 80,375 3

Parallel Bitmap Heap Scan on "asset_search_matches2" "m_1" (cost=2,023.15..43,629.67 rows=103,503 width=20) (actual time=45.074..81.148 rows=80,375 loops=3)

  • Recheck Cond: ("to_tsvector"('"english_nostop"'::"regconfig", "value") @@ '''a'':*'::"tsquery")
  • Heap Blocks: exact=4822
28. 46.157 46.157 ↑ 1.0 241,124 1

Bitmap Index Scan on "asset_search_matches2_to_tsvector_idx" (cost=0.00..1,961.05 rows=248,407 width=0) (actual time=46.157..46.157 rows=241,124 loops=1)

  • Index Cond: ("to_tsvector"('"english_nostop"'::"regconfig", "value") @@ '''a'':*'::"tsquery")
29. 0.008 0.024 ↑ 154.2 12 3

Hash (cost=28.50..28.50 rows=1,850 width=16) (actual time=0.023..0.024 rows=12 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
30. 0.016 0.016 ↑ 154.2 12 3

Seq Scan on "searchable_field_weights" "w" (cost=0.00..28.50 rows=1,850 width=16) (actual time=0.013..0.016 rows=12 loops=3)