explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GpUq

Settings
# exclusive inclusive rows x rows loops node
1. 3.145 823.997 ↑ 1.0 200 1

Limit (cost=142,321.54..142,322.04 rows=200 width=64) (actual time=820.846..823.997 rows=200 loops=1)

2. 35.505 820.852 ↑ 2,145.2 200 1

Sort (cost=142,321.54..143,394.13 rows=429,037 width=64) (actual time=820.844..820.852 rows=200 loops=1)

  • Sort Key: ("sum"("w"."weight")) DESC
  • Sort Method: top-N heapsort Memory: 50kB
3. 289.554 785.347 ↑ 2.2 194,776 1

Finalize HashAggregate (cost=116,270.72..123,778.87 rows=429,037 width=64) (actual time=686.103..785.347 rows=194,776 loops=1)

  • Group Key: "e_3"."id", (CASE WHEN ("e_3"."type" = 'linear'::"availability_type") THEN "l"."channel" WHEN ("e_3"."type" = 'svod'::"availability_type") THEN "s"."channel" ELSE NULL::"uuid" END)
4. 55.166 495.793 ↑ 1.3 266,253 1

Gather (cost=73,814.03..112,695.42 rows=357,530 width=64) (actual time=384.462..495.793 rows=266,253 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 146.192 440.627 ↑ 2.0 88,751 3

Partial HashAggregate (cost=72,814.03..75,942.42 rows=178,765 width=64) (actual time=377.067..440.627 rows=88,751 loops=3)

  • Group Key: "e_3"."id", CASE WHEN ("e_3"."type" = 'linear'::"availability_type") THEN "l"."channel" WHEN ("e_3"."type" = 'svod'::"availability_type") THEN "s"."channel" ELSE NULL::"uuid" END
6. 64.934 294.435 ↑ 1.5 123,117 3

Parallel Hash Join (cost=26,791.37..71,473.29 rows=178,765 width=44) (actual time=179.856..294.435 rows=123,117 loops=3)

  • Hash Cond: ("m"."asset" = "e_3"."asset")
7. 17.108 95.784 ↑ 1.3 80,375 3

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

  • Hash Cond: ("m"."searchable_field" = "w"."searchable_field")
8. 36.240 78.655 ↑ 1.3 80,375 3

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

  • Recheck Cond: ("to_tsvector"('"english_nostop"'::"regconfig", "value") @@ '''a'':*'::"tsquery")
  • Heap Blocks: exact=5389
9. 42.415 42.415 ↑ 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=42.414..42.415 rows=241,124 loops=1)

  • Index Cond: ("to_tsvector"('"english_nostop"'::"regconfig", "value") @@ '''a'':*'::"tsquery")
10. 0.006 0.021 ↑ 154.2 12 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
11. 0.015 0.015 ↑ 154.2 12 3

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

12. 44.616 133.717 ↑ 1.3 125,190 3

Parallel Hash (cost=22,760.49..22,760.49 rows=156,488 width=68) (actual time=133.717..133.717 rows=125,190 loops=3)

  • Buckets: 524288 Batches: 1 Memory Usage: 30624kB
13. 19.995 89.101 ↑ 1.3 125,190 3

Hash Left Join (cost=4,186.16..22,760.49 rows=156,488 width=68) (actual time=1.118..89.101 rows=125,190 loops=3)

  • Hash Cond: ("e_3"."id" = "l"."id")
14. 18.670 68.217 ↑ 1.3 125,190 3

Parallel Hash Left Join (cost=3,921.17..21,907.86 rows=156,488 width=52) (actual time=0.219..68.217 rows=125,190 loops=3)

  • Hash Cond: ("e_3"."id" = "s"."svod")
15. 0.000 49.355 ↑ 1.3 125,190 3

Parallel Append (cost=0.00..17,398.07 rows=156,488 width=36) (actual time=0.017..49.355 rows=125,190 loops=3)

16. 21.920 21.920 ↑ 1.2 67,156 3

Parallel Seq Scan on "linear" "e_3" (cost=0.00..8,588.45 rows=83,945 width=36) (actual time=0.013..21.920 rows=67,156 loops=3)

17. 27.463 27.463 ↓ 1.2 80,419 2

Parallel Seq Scan on "svod" "e_2" (cost=0.00..7,372.16 rows=67,016 width=36) (actual time=0.013..27.463 rows=80,419 loops=2)

18. 3.859 3.859 ↓ 1.7 13,264 1

Parallel Seq Scan on "tvod" "e_1" (cost=0.00..655.02 rows=7,802 width=36) (actual time=0.006..3.859 rows=13,264 loops=1)

19. 0.000 0.000 ↓ 0.0 0 1

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

20. 0.000 0.192 ↓ 0.0 0 3

Parallel Hash (cost=3,915.82..3,915.82 rows=428 width=32) (actual time=0.192..0.192 rows=0 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
21. 0.004 0.575 ↓ 0.0 0 1

Hash Semi Join (cost=62.77..3,915.82 rows=428 width=32) (actual time=0.575..0.575 rows=0 loops=1)

  • Hash Cond: ("s"."channel" = "x_1"."channel")
22. 0.013 0.013 ↑ 153,132.0 1 1

Parallel Seq Scan on "svod_channels" "s" (cost=0.00..3,446.32 rows=153,132 width=32) (actual time=0.013..0.013 rows=1 loops=1)

23. 0.001 0.558 ↓ 0.0 0 1

Hash (cost=62.76..62.76 rows=1 width=16) (actual time=0.557..0.558 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
24. 0.557 0.557 ↓ 0.0 0 1

Seq Scan on "allowed_channels" "x_1" (cost=0.00..62.76 rows=1 width=16) (actual time=0.557..0.557 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
25. 0.001 0.889 ↓ 0.0 0 3

Hash (cost=262.55..262.55 rows=195 width=32) (actual time=0.889..0.889 rows=0 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
26. 0.000 0.888 ↓ 0.0 0 3

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

27. 0.001 0.888 ↓ 0.0 0 3

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

  • Group Key: "x"."channel
28. 0.887 0.887 ↓ 0.0 0 3

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

  • 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
29. 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")