The tag has no usage guidance.

learn more… | top users | synonyms

10
votes
4answers
455 views

Should the index on an identity column be nonclustered?

For a table with a primary key (PK) on an identity column, it will be clustered by default. Could it be better as nonclustered? The reason is other indexes will be created for queries. A query which ...
1
vote
0answers
45 views

Database fragmentation and heap SQL Server

We have critical performance issues with our production database (its around 300 gb size) We have run the following script for a few huge tables : DECLARE @db_id SMALLINT; DECLARE @object_id INT; ...
0
votes
0answers
131 views

tmp_table_size and max_heap_table_size setting

Does anyone know whether or not setting global MYSQL variables(tmp_table_size and max_heap_table_size) to the same value will prevent Converting HEAP to MyISAM (since there should never be a temporary ...
3
votes
1answer
516 views

Query shows SELECT 0

I'm looking through the queries being executed by a third party application. The application was flagged as being slow by some of our end-users. It seems to INSERT records into a HEAP, then DELETE ...
4
votes
1answer
275 views

Table Data Space Used Confusion

I have a heap table with around 700k rows. The rowsize is 34 bytes: (1x BIGINT, 2x SMALLINT, 2x BIT, 4X INT, 1x SMALLDATETIME). Why does Data Space Used say this table is taking up nearly 4000000KB ...
1
vote
1answer
532 views

Moving a heap between filegroups

I would like to move the tables in my database from one filegroup (Primary) to a another (a new one). I can find lots of advice on this concerning tables with clustered indexes but all these tables in ...
18
votes
3answers
2k views

What are valid usage scenarios for HEAP tables?

I am currently doing some data imports into a legacy system and discovered that this system does not use a single clustered index. A quick Google search introduced me to the concept of HEAP tables and ...
3
votes
1answer
542 views

How do I automate converting heaps into clustered indexes?

I have around 40 tables in one of our production databases that, for varying reasons, where not created with a clustered index. What is the best automated method for converting these heaps? Since ...
3
votes
2answers
552 views

Heap size too large for data present

A SQL Server 2008 R2 Standard Edition database has a staging table with no indexes, eight varchar(50) and one varchar(255) columns, and 162,676 rows. I'd expect that this table shouldn't be much over ...
6
votes
1answer
919 views

Are there any performance benefits to using a hash table with no clustered index?

I have this table: CREATE TABLE [dbo].[relatea] ( [mid] [varchar](16) NOT NULL, [sid] [varchar](16) NOT NULL ) It stores hash matches. Is there any benefit to having this as a heap? It has ...
4
votes
1answer
124 views

SQL Server - is it ok to store link table as a heap?

I'm trying to understand if it's a good practice to have non-clustered PK on link table: CREATE TABLE table1_table2(table1_id INT NOT NULL, table2_id INT NOT NULL, CONSTRAINT PK_T1_T2 PRIMARY KEY ...
11
votes
3answers
443 views

Are heaps considered an index structure or are they strictly a table structure without index?

Inspired by this post: https://twitter.com/#!/SQLChicken/status/102930436795285505 Heaps: Are they considered an index structure or are they strictly a table structure without index?