That's not a covering index. A covering index allows a user to perform an index-only scan if the select list in the query matches the columns that are included in the index. You can specify the additional columns for the index using the "INCLUDE" keyword, e.g.
Right, include is the one I wanted to put there and I'll update the post. Doesn't change the idea anyway as if you update the column you will move the entry anyway. Both are covering the projection and the query planner see it, that's the important point.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That's not a covering index. A covering index allows a user to perform an index-only scan if the select list in the query matches the columns that are included in the index. You can specify the additional columns for the index using the "INCLUDE" keyword, e.g.
CREATE INDEX a_b_idx ON x (a,b) INCLUDE (c);
What you have is a multicolumn index.
Right, include is the one I wanted to put there and I'll update the post. Doesn't change the idea anyway as if you update the column you will move the entry anyway. Both are covering the projection and the query planner see it, that's the important point.