在where条件下,我们使用行过滤,是否有任何方法对其进行索引?



所以在postgres select语句中,我有这个查询,它像这样过滤作为一个例子。

select *
from table1
where ROW (table1.created_on, table1.id) < ROW ('2022-02-05 09:37:06.719', 'b8e4c048-ec10-4c7e-9811');

我们可以索引这个吗?

一个普通的多列索引就可以了

create index on table1 (created_on, id)