English 中文(简体)
在服务器中,是否设定了文本一栏的所有价值,以降低数据库的规模?
原标题:In SQL server, does setting all values for a Text column to NULL reduce database size?

在2008年服务器范围内。

I m working on compressing and migrating values from a column with Text datatype to another one with Image datatype, same table. For now, we don t want to drop the Text column. So, I m just setting all the values of that column to NULL.

是否为挪威航天中心提供空间收益? i.e. 缩小数据库规模?

这栏是否删除?

如果不是的话,还需要做些什么来声称未使用的空间?

最佳回答

为了实际减少DATABASE的规模,你需要:

  • Drop the column
  • Rebuild the clustered index or the table if there is no clustered index
  • Shrink the database files

我不建议缩小,因为它会造成分裂。 然而,数据库的磁带不会自动下降。 您将拥有一个数据库,内有空空空间,可填充更多的数据/索引,而不进一步开发数据库。

问题回答

Text column takes minimum 16 char value for a column value in single row of table. To claim the free space reorganize data and index after setting all value to null in this column.

为了恢复这一空间,我们必须使用DBCLEANTABLE,或缩小数据库。

Syntax: DBCC CLEANTABLE( Databasename, "Table_name or View_name")

http://technet.microsoft.com/en-us/library/cc917715.aspx“rel=” 参照这一链接,并重新列出表格。

给全国人民党树立了价值观,这没有任何变化。 排入各栏不会自行腾出磁盘空间。 页: 1 Space Taken by Dropped Columns





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

难以执行 REGEXP_SUBSTR

I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域

SQL Query Shortcuts

What are some cool SQL shorthands that you know of? For example, something I learned today is you can specify to group by an index: SELECT col1, col2 FROM table GROUP BY 2 This will group by col2

PHP array callback functions for cleaning output

I have an array of output from a database. I am wondering what the cleanest way to filter the values is example array Array ( [0] => Array ( [title] => title 1 ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

Running numbers in SQL

I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0; How can i create a result set with a running number in the first row? So the result would look like this: 1 Name_1 2 ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签