> <i>Coming from Oracle, I was always taught that NULLs are not indexed</i><p>That left me wondering how, if all indexes are by default partial in Oracle… how does one make an unpartial? nonpartial? index.<p><a href="https://use-the-index-luke.com/sql/where-clause/null/index" rel="nofollow">https://use-the-index-luke.com/sql/where-clause/null/index</a><p>Apparently, you add a computed column to the index that just computes a constant value. And single non-null column then causes the nulls in other columns to get indexed, it's only if the whole tuple is composed of nulls that it gets left out.<p>That also seems like a bug waiting to happen; someone inverts a query to find unset (NULL) entries, and now you're doing a table scan.<p>…but it seems also like a form of brain rot, induced by a particular implementation, e.g., similar to how I've had MySQL users ask how to make a key on a table. Where a "key" is an index, it's just that MySQL by default uses the word "key" to mean index, instead of … key¹. (The query language even <i>supports</i> "INDEX" in place of "KEY", but things like "SHOW TABLE" default to the "wrong" (linguistically, not programmatically) word.) And then you might have to de-tangle why these two are different concepts, how they're different. It's very <i>Arrival</i>, in the sense of language (mis-)shaping perception.<p>¹a key is a set of columns that are sufficient to identify a row. The primary such set of columns is … the <i>primary</i> key. An index can index a key (if more than one exists within a table), but it doesn't have to.