I was wondering if SQL server (or other RDBMS for that matter) considers what it already has in memory when creating a query plan, e.g.:
There are 2 indexes that are about equally good in serving the request but one of them is already either fully or partially in-memory, while the other one is not.
Is this something that planner takes into account or loading index from disc is not considered too important or just hard to implement such a feature properly?