473,746 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rebuilding indexes

Hi
I got the advice to rebuild the indexes on the databases once a year.
Espesially if the database have grown much. The question is: How do I
do that?
If I try to run the indexscript wich was run when the databases were
created, I only get the message that the indexes already exists.
Are there a command to automatically rebuild the indexes
automatically?

Roger
Jul 20 '05 #1
3 3125

"Roger" <ro**********@t iscali.no> wrote in message
news:3i******** *************** *********@4ax.c om...
Hi
I got the advice to rebuild the indexes on the databases once a year.
Espesially if the database have grown much. The question is: How do I
do that?
If I try to run the indexscript wich was run when the databases were
created, I only get the message that the indexes already exists.
Are there a command to automatically rebuild the indexes
automatically?

Roger


See DBCC DBREINDEX in Books Online, or use a maintenance plan. Once a year
sounds like a very conservative schedule, so you may want to consider weekly
rebuilds if you believe you need them.

Simon
Jul 20 '05 #2
Checkout the whitepaper below - it will help you decide whether it's even
worth rebuilding the indexes and explain the pros and cons of the different
methods of doing so.

http://www.microsoft.com/technet/tre...e/ss2kidbp.asp

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

"Roger" <ro**********@t iscali.no> wrote in message
news:3i******** *************** *********@4ax.c om...
Hi
I got the advice to rebuild the indexes on the databases once a year.
Espesially if the database have grown much. The question is: How do I
do that?
If I try to run the indexscript wich was run when the databases were
created, I only get the message that the indexes already exists.
Are there a command to automatically rebuild the indexes
automatically?

Roger

Jul 20 '05 #3
Hi
Thank you
I'll dig into it

On Fri, 5 Mar 2004 10:28:48 -0800, "Paul S Randal [MS]"
<pr*****@online .microsoft.com> wrote:
Checkout the whitepaper below - it will help you decide whether it's even
worth rebuilding the indexes and explain the pros and cons of the different
methods of doing so.

http://www.microsoft.com/technet/tre...e/ss2kidbp.asp


Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2266
by: Steve_CA | last post by:
Hi, The more I read, the more confused I'm getting ! (no wonder they say ignorance is bliss) I just got back from the bookstore and was flipping through some SQL Server Administration books. One says, that to get the best query performance, youi do two things:
9
1898
by: pheonix1t | last post by:
hello, I've been assigned to do performance tuning on an SQL2000 database (around 10GB in size, several instances). So far, I see a single RAID5 array, 4CPU (xeon 700MHZ), 4GB RAM. I see the raid5 as a bottleneck. I'd setup a raid 10 and seperate the logs, database and OS(win2k). The one thing that was a bit odd to me was that I was told this place doesn't use indexes. The company is a house builder. They are pretty
4
2487
by: mairhtin o'feannag | last post by:
Hello, I want to ask the question "how large is each of the indexes in a particular tablespace??" since I want to know which user-created indexes are taking up huge amounts of space. I used the following query to determine *WHICH* indexes are in the tablespace in question. Now I just need to get the size of each of the indexes returned. select cast(i1.indschema as char(15)) index_schema, cast(i1.indname as char(25)) index_name,
8
1121
by: Andy Capon | last post by:
Hi There, We have a medium size project about 2000 source files and 700,000 lines of code, as you can imagine this takes some time to rebuild all. Now our problem is that we have a code generator we have developed that updates some of our classes, as an example lets say I update 50 files. When we do a build the ide builds nearly all of the source files while we swear and then twiddle our thumbs for a couple of hours.
7
3224
by: pankaj_wolfhunter | last post by:
Greetings, While loading data into Sql Server using BCP utility, we have to explicitly need to drop the indexes. then after loading the data we recreate them. I just want to know if this is possible through some other ways. i mean in DB2 we have an option of index rebuild option which takes care of this job. Do we have anything as such in BCP or is there some other way? Any help will be appreciated
14
19679
by: Jeff | last post by:
This is the first time that I remember ever having too many indexes on a table, but it has happened. I have en employees table and store in many places, on tables, the id of the employee that performed some action. Yes, I know, that could be in an audit trail but it isn't. For example, who printed a sales order, who processed it etc is stored on the sales orders table. Well, I have run out of indexes on the employees table when trying...
17
2230
by: boa | last post by:
I'm currently planning disk layouts and use for a new version of our database. The current version has all data and indexes in the default filegroup, placed on one big raid-5 array(6 drives) along with the transaction log. Performance is not the best, as you may imagine... Next week we will add another 14 drives and organize them in different combos of raid-10 and raid-1, and then create several filegroups and place tables and index data...
10
2700
by: lesperancer | last post by:
you start with a small application in access97, then you have more modules and more... and you reach the point where tables like 'item' and 'employee' reach the limit and you know there's more indexes required for RI to come does creating a RI programatically instead of the relationship window still consume one of the 32 indexes ? does access2000 / 2003 allow more indexes per table ?
0
7597
MMcCarthy
by: MMcCarthy | last post by:
The more data you include in your tables the more you will need to have indexes to search and sort that data. However, there is a balance between having enough indexes and too many. Too many indexes will slow down the speed of updates on your records. Access presets a number of Indexes for you. If you look in Tools ... Options under the Tables/Queries tab you will see that under "Auto Index on Import/Create" there is a list as follows: ...
0
8974
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9218
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8227
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6060
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4575
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.