Tag Info

New answers tagged

4

FILLFACTOR only applies when you build or rebuild an index, not during normal operation. Normal operations always try to fill the pages to 100%. If you insert a row that has a variable width, then update the row to be longer, that row will no longer fit on the page if there isn't enough extra space to store the after-image on the same page. If there isn't ...


4

I skipped the code example, and jumped to what seems to be the real question here On top of that, a manual inspection of the index in question shows no text, ntext, image, xml or varchar(MAX), nvarchar(MAX) or varbinary(MAX). Could there be something I'm missing here? For the record, this is a clustered index. You certainly are missing something, ...


0

Aaron had missed the spatial data types. Modify it like this. AND ((c.system_type_id IN (34,35,99,241, 240)) -- image, text, ntext, xml, CLR types OR (c.system_type_id IN (167,231,165) -- varchar, nvarchar, varbinary AND max_length = -1)) That's the easy way. But it does include the datatype hierarchyid. I'm not sure if indexes on hierarchyid ...


3

why isn't it possible to access the data directly from the table discarding the B-tree? (most likely by scanning the table row by row) wouldn't that be more appropriate than inaccessible data at all? To answer your question, Indexing basics comes more handy -- An index is made up of a set of pages (index nodes) that are organized in a B-tree structure. This ...


1

First point: a table is either a heap (has no clustered index) or a clustered table (has a clustered index). One table can have at most on clustered index, since there is only one way to sort a table at one point in time. When creating a clustered index, SQL Server sorts the data pages and creates a b-tree indexing the pages (not the rows - non-leaf pages ...


1

You'll need to look at the wait type when the query is running. Odds are you need faster disks as building an index on a table that large is going to cause MASSIVE amounts of reads and writes. In a nutshell you'll need to read the 120 Gig table, sorting it based on the clustering key (which is going to cause a ton of spill to tempdb writing probably 100 ...


0

To increase the speed of any SQL command you should have a properly set up database, thus I do hope that your database is stored on a different disk and that the master and tempdb are on their own disk. That being said there are several factors that affect index creation: if the table is sorted already, and since it looks like you are building this on a ...


0

Here are a few things to evaluate: Turn on data compression: it looks like you're IO bound and have CPU to spare. Data compression might be a good trade-off here. Turn SORT_IN_TEMPDB on. This can drastically improve IO patterns (more sequential IO, and less fragmentation in the final index). Build the index into a fresh (presized) filegroup. A fresh ...


0

Each time when you create/recreate cluster index, server starts to order pages, and this is quite resource-demanding procedure. Your table is a large one. I'd advise you to divide your table in several smaller tables (i.e. to perform data normalization), if it is possible. Or you can create an empty copy of this table, add cluster index on empty table, ...



Top 50 recent answers are included