微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在PostgreSQL 12中,一个子句如何产生多个indexqual条件?

如何解决在PostgreSQL 12中,一个子句如何产生多个indexqual条件?

我正在阅读Postgresql 12的源代码,其中 server/nodes/pathnodes.h我读过

indexquals is a list of RestrictInfos for the directly-usable index
conditions associated with this IndexClause.  In the simplest case
it's a one-element list whose member is iclause->rinfo.  Otherwise,it contains one or more directly-usable indexqual conditions extracted
from the given clause.  The 'lossy' flag indicates whether the
indexquals are semantically equivalent to the original clause,or
represent a weaker condition.

在此结构中

typedef struct IndexClause
{
    NodeTag     type;
    struct RestrictInfo *rinfo; /* original restriction or join clause */
    List       *indexquals;     /* indexqual(s) derived from it */
    bool        lossy;          /* are indexquals a lossy version of clause? */
    AttrNumber  indexcol;       /* index column the clause uses (zero-based) */
    List       *indexcols;      /* multiple index columns,if RowCompare */
} IndexClause;

但是,我不确定一个子句(或一个限制Info)如何产生多个indexquals。

有人可以给我一个例子吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。