Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定一个在 foo 和 bar 列上有一个主索引的数据库,是否值得在单列 foo 上添加一个单独的索引(假设大多数查询是 ... WHERE foo = '...')?如果它有所作为,我在 pgsql 上。
如果 index 是(foo,bar)- 按此顺序,您不需要在foo. 否则你会。
(foo,bar)
foo