小编eco*_*gic的帖子

如果我只关心查询的字段不为空,我是否想要一个索引

在 SQL 中,如果我想要查询的所有内容(在 where 条件中)是字段不为空时,是否所有关于索引的常见考虑都适用?

我可以应用索引的特殊配置来涵盖这种特定情况吗?

例如:

select id
from Accesses
where token is not null;
Run Code Online (Sandbox Code Playgroud)

token如果我必须搜索特定的令牌值,是否值得尽可能多地添加索引?

我的数据库是 Postgres。

postgresql performance

6
推荐指数
1
解决办法
804
查看次数

标签 统计

performance ×1

postgresql ×1