Skip to content

Instantly share code, notes, and snippets.

@ycku
Created November 9, 2022 14:21
Show Gist options
  • Save ycku/a8c3c7650b419cc90f11447575ba0f0d to your computer and use it in GitHub Desktop.
Save ycku/a8c3c7650b419cc90f11447575ba0f0d to your computer and use it in GitHub Desktop.
你又不小心 IN 了嗎?
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------
Finalize Aggregate (cost=10449.10..10449.11 rows=1 width=8) (actual time=101.312..104.828 rows=1 loops=1)
-> Gather (cost=10448.99..10449.10 rows=1 width=8) (actual time=100.990..104.822 rows=2 loops=1)
Workers Planned: 1
Workers Launched: 1
-> Partial Aggregate (cost=9448.99..9449.00 rows=1 width=8) (actual time=90.238..90.241 rows=1 loops=2)
-> Parallel Hash Anti Join (cost=4774.06..9446.73 rows=904 width=0) (actual time=64.249..89.494 rows=13592 loops=2)
Hash Cond: (s.key = t.key)
-> Parallel Seq Scan on s (cost=0.00..2843.47 rows=117647 width=4) (actual time=0.007..11.334 rows=100000 loops=2)
-> Parallel Hash (cost=2843.47..2843.47 rows=117647 width=4) (actual time=32.728..32.729 rows=100000 loops=2)
Buckets: 131072 Batches: 4 Memory Usage: 3008kB
-> Parallel Seq Scan on t (cost=0.00..2843.47 rows=117647 width=4) (actual time=0.010..12.424 rows=100000 loops=2)
Planning Time: 0.290 ms
Execution Time: 104.857 ms
(13 rows)
@ycku
Copy link
Author

ycku commented Nov 9, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment