Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Kristen
Test
22859 Posts |
Posted - 2004-12-04 : 02:51:18
|
I've just scripted all the PKs and indexes on a production database and for some reason most of them are set to "WITH FILLFACTOR = 90".I can't see any point in this, what's my best way to change them to the default (given that its a production system)?I've got a range of Clustered and Non-clustered PKs and Indexes to doI was thinking of something along the lines of:BEGIN TRANSACTIONALTER TABLE [dbo].[MyTable] DROP [PK_MyTable]ALTER TABLE [dbo].[MyTable] WITH NOCHECK ADD CONSTRAINT [PK_MyTable] PRIMARY KEY CLUSTERED ( [MyID] ) /* WITH FILLFACTOR = 90 */ ON [PRIMARY] COMMITCREATE CLUSTERED INDEX [IX_MyIndex] ON [dbo].[MyTable2]( [MyColumn]) /* WITH FILLFACTOR = 90 */ WITH DROP_EXISTING ON [PRIMARY] Kristen |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-12-05 : 02:26:30
|
| By the by, I read an article somewhere that suggested that the Wizard Maintenance Plans adjust the Fill Factor if you use the [Optimizations] "Reogrganize data and index pages" and "Change free space per page percentage to 10%" - maybe that's how my FILLFACTORs have become 90% Kristen |
 |
|
|
ruan4u
Posting Yak Master
132 Posts |
Posted - 2004-12-07 : 12:32:12
|
| So can we use transactions for DDL statements.i think oracle doesnt allow that |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-12-07 : 12:46:05
|
Yet another reason not to use Oracle. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-12-07 : 12:55:24
|
| I'll have to DROP / re-CREATE all the FKs too won't I :-(There isn't any sort of DROP EXISTING I can do with a PK to avoid that, is there?Kristen |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-12-07 : 12:59:05
|
| Nope.Cheer up though, SQL2005 will introduce ALTER INDEX and other online index functions. |
 |
|
|
|
|
|