go-mysql-server
go-mysql-server copied to clipboard
indexed table access with IN predicate on primary key
re zach: "When we push down an IN clause to the table as an index, we should in principle remove that predicate from the filter. Not having the filter at all is even better than having it fast, and should work for IN expressions."
Filter(mytable.i IN (1, 2, 3, 4))
└─ Projected table access on [i s]
└─ IndexedTableAccess(mytable on [mytable.i])
We do not need to traverse every row in mytable
, just point lookup the values in the filter.