How do I clear a table from SQL Server's cache?
There is no way of doing this.
DBCC DROPCLEANBUFFERS
doesn't accept any parameters for a specific database or object. Internally SQL Server can do this at a database level however as when a database is AUTO_CLOSE
d all corresponding pages are removed from the buffer cache.
Also internally SQL Server can mark certain pages such that they will be the first ones kicked out by the lazy writer. This is used by DMVs such as sys.dm_db_index_physical_stats
to avoid flushing the buffer pool as alluded to in this article but this functionality is not exposed in any way to us (even though it might be useful to be able to specify the same if doing a one off scan of a large table for example).
You can not specify that specific tables should not be cached. What makes you think that you don't want the tables in cache?
SQL Server does ALL its normal operations in the buffer pool so if you were able to tell SQL Server not to load a table into cache that table wouldn't be accessible for any normal DML operations.