Contents
How can you tell what tables are taking up the most space?
How can you tell what Tables are taking up the most space in a SQL Server 2005 Database? – Stack Overflow How can you tell what Tables are taking up the most space in a SQL Server 2005 Database? How can you tell what Tables are taking up the most space in a SQL Server 2005 Database?
How to truncate a table using BULK INSERT?
One way to do this entirely from Management Studio involves using xp_cmdshell to export the table data to a file. If xp_cmdshell is not currently enabled, the following will do that: Note you will need to change the path and -S server name, and possibly provide login credentials. How we can truncate the table, and reload it using BULK INSERT:
How to free unused space for a table?
Notice that some space has been reclaimed, but the remaining pages are much less full than they were. This results in some compaction and space savings, but it is not perfect. Running the compaction again may or may not improve the situation. In my test, it did not, no matter how many times I re-ran it.
Why is Bulk insert not efficient in SQL Server?
The above is not quite as efficient as it could be due to a long-standing bug: BULK INSERT with IDENTITY column creates query plan with SORT. The workaround listed there is effective, but I would only bother with it if the table is very large.
How can I see how much memory my database is using?
You can also use the object explorer to monitor memory consumed by individual memory-optimized tables. You can monitor memory use at the database level as follows. Launch SQL Server Management Studio and connect to a server. In Object Explorer, right-click the database you want reports on.
How much memory is used in SQL Server?
The sample output shows that the total memory allocated is 18 MB system-level memory consumption and 1358MB allocated to database id of 5. Since this database is mapped to a dedicated resource pool, this memory is accounted for in that resource pool. For more information see sys.dm_os_memory_clerks (Transact-SQL).
How to determine the size of a table?
Based on the RolandMySQLDBA’s answer I think we can use the above to get the size of each schema in a table: Really liked it! You could perhaps look at the size of the files… Each table is stored in a couple of separate files inside a folder that is named whatever you called your database. These folders are stored within the mysql data directory.