To See Which Tables Have Been Processed Last in SQL Server

Hello everyone,

In this article, I will try to give information about seeing which tables were processed last in SQL Server.

In SQL Server, in some cases, you may want to see which tables were processed last.

You can easily do this using the code below.

SELECT DB_NAME(ius.[database_id]) AS [Database],
       OBJECT_NAME(ius.[object_id]) AS [TableName],
       MAX(ius.[last_user_lookup]) AS [last_user_lookup],
       MAX(ius.[last_user_scan]) AS [last_user_scan],
       MAX(ius.[last_user_seek]) AS [last_user_seek]
FROM sys.dm_db_index_usage_stats AS ius
WHERE ius.[database_id] = DB_ID()
GROUP BY ius.[database_id],
         ius.[object_id];

When you run the above code, you will see a result similar to the one below.

To See Which Tables Have Been Processed Last in SQL Server

As you can see, we have seen which tables were processed last.

Good luck to everyone in business and life.

65 Views

Yavuz Selim Kart

I try to explain what I know in software and database. I am still improving myself by doing research on many programming languages. Apart from these, I am also interested in Graphic Design and Wordpress. I also have knowledge about SEO and Social media management. In short, I am a determined person who likes to work hard.

You may also like...

Don`t copy text!