Plan nodes · Set operations and appends
SetOp Computes INTERSECT or EXCEPT.
Counts how often each distinct row appears in each input, with a hash table (Hashed) or over sorted input (Sorted), and returns the rows that the operation keeps.
Example SELECT country FROM artists INTERSECT SELECT country FROM artists WHERE id < 10 3 nodes
SetOp rows 8 (estimated 5) cost 46.46..46.47 buffers: 16 hit
strategy Hashed
command Intersect
Index Scan using artists_pkey on artists rows 9 (estimated 9) cost 0.28..8.43 buffers: 3 hit
index condition (id < 10)
1 index searches
Seq Scan on artists artists_1 rows 2,000 (estimated 2,000) cost 0..33 buffers: 13 hit
Run with EXPLAIN (ANALYZE, BUFFERS, TIMING OFF, SUMMARY OFF) on the sample database , PostgreSQL 19.0. Open it in the EXPLAIN visualizer →
Related Append · Merge Append · Recursive Union
This site is not affiliated with or endorsed by the SQLite project, the PostgreSQL Global Development Group, Oracle, Google, Meta, Cockroach Labs, Elasticsearch B.V., the Apache Software Foundation, MongoDB, Inc. or Redis Ltd. SQLite is a registered trademark of Hipp, Wyrick & Company, Inc.; PostgreSQL, MySQL, LevelDB, RocksDB, CockroachDB, Elasticsearch, Lucene, MongoDB, WiredTiger and Redis are trademarks of their owners. The names are used only to say which files the site reads.
Sister sites: LLM Anatomy · Distribution Atlas · Notation Decoder · uresk.net
Made by Spencer Uresk · About · Files you open stay on your device.