Skip to content

Instantly share code, notes, and snippets.

@ycku
Created November 9, 2022 14:07
Show Gist options
  • Save ycku/8e7c4c49ec4e227ed3d6e42adec33bc7 to your computer and use it in GitHub Desktop.
Save ycku/8e7c4c49ec4e227ed3d6e42adec33bc7 to your computer and use it in GitHub Desktop.
你又不小心 IN 了嗎?
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=6135.53..6135.54 rows=1 width=8) (actual time=35.063..36.716 rows=1 loops=1)
-> Gather (cost=3630.09..6135.53 rows=1 width=0) (actual time=19.535..35.008 rows=37156 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Parallel Hash Anti Join (cost=2630.09..5135.43 rows=1 width=0) (actual time=11.705..23.096 rows=12385 loops=3)
Hash Cond: (s.key = t.key)
-> Parallel Index Only Scan using s_key_idx on s (cost=0.29..2088.96 rows=41667 width=4) (actual time=0.069..4.765 rows=33333 loops=3)
Heap Fetches: 0
-> Parallel Hash (cost=2108.96..2108.96 rows=41667 width=4) (actual time=10.973..10.974 rows=33333 loops=3)
Buckets: 131072 Batches: 1 Memory Usage: 4992kB
-> Parallel Index Only Scan using t_key_idx on t (cost=0.29..2108.96 rows=41667 width=4) (actual time=0.063..4.094 rows=33333 loops=3)
Heap Fetches: 0
Planning Time: 0.902 ms
Execution Time: 36.869 ms
(14 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment