473,656 Members | 2,824 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Indexing to prevent timeout expired message

sorry for posting a question that has probably been posted hundreds of
times, but i can't seem to find the answer i need...We're using a Sql
Server 7.0 database and recently started getting timeout expired
errors on our views, which i'm assuming is due to the volume of
records in our tables. Unfortunately i'm not too experiences w/
indexing tables, so my question is:
1) how do you determine which fields to index (does it have to be a
field w/ no nulls, no duplicates..sim ilar to primary key), and why not
index the primary key
2) is it better to index the same field on different tables, or is it
a better design to index a different field for each table (ex. do you
want to index the same field that you link the different tables with,
or do you want to avoid doing this)
3) can somebody explain the concept of creating a clustered index
4) once table is indexed, if there are users accessing the linked
tables via Access, do they have to re-link the tables?

sorry for the number of questions and what may appear to be simple
questions to most, but again, i'm pretty unfamiliar w/ indexing and
would really appreciate any help...thanks
Jul 20 '05 #1
1 5177

"Danny" <da*****@mindsp ring.com> wrote in message
news:35******** *************** ***@posting.goo gle.com...
sorry for posting a question that has probably been posted hundreds of
times, but i can't seem to find the answer i need...We're using a Sql
Server 7.0 database and recently started getting timeout expired
errors on our views, which i'm assuming is due to the volume of
records in our tables. Unfortunately i'm not too experiences w/
indexing tables, so my question is:
1) how do you determine which fields to index (does it have to be a
field w/ no nulls, no duplicates..sim ilar to primary key), and why not
index the primary key
2) is it better to index the same field on different tables, or is it
a better design to index a different field for each table (ex. do you
want to index the same field that you link the different tables with,
or do you want to avoid doing this)
3) can somebody explain the concept of creating a clustered index
4) once table is indexed, if there are users accessing the linked
tables via Access, do they have to re-link the tables?

sorry for the number of questions and what may appear to be simple
questions to most, but again, i'm pretty unfamiliar w/ indexing and
would really appreciate any help...thanks


Indexing is big topic, and critical for performance, so I suggest you start
looking into the Books Online documentation on indexes and performance
tuning. You can find a lot of information on the web, too. One quick way to
get going would be to use the Index Tuning Wizard to recommend where you
should place indexes.

As for your questions above, here are some brief answers (which contain
plenty of over-simplification and over-generalization) :

1. Look at the columns in the WHERE clauses of your queries. You can index
any column (except bit or computed columns in SQL7), or a combination of
columns. Adding more indexes to a table generally makes SELECTs faster, but
INSERT/UPDATEs slower.

2. Index the appropriate columns on each table - columns used in joins are
almost always worth indexing.

3. In a clustered index, the table data is sorted in the order of the index
(the index in fact holds the data), so you can only have one per table (and
most tables should have one). As a general rule, queries returning single
rows don't benefit much from a clustered index; queries returning a range of
rows, or an aggregate of a number of rows will benefit. Note that primary
keys are clustered by default, but this may not be the best choice.

4. Indexing is completely invisible to clients - they have no idea what
indexes, if any, are on the table. The exception would be if you create a
UNIQUE index, and the client performs an INSERT or UPDATE which would
violate the uniqueness. In that case, the client will get an error.

Simon
Jul 20 '05 #2

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

Similar topics

4
3923
by: Paul | last post by:
I sometimes get a timeout error when populating my datagrid, the code is WizardConnection.Open() UpdateCommand.CommandText = "EXECUTE sp_assign_user '" & PhysOffice.SelectedValue & "', '" & Context.User.Identity.Name & "'" UpdateCommand.ExecuteNonQuery()
5
13269
by: Jason | last post by:
Hi all I get the following error when executing a rather intense stored procedure from an ASPX page. I have tried: - Increasing timeouts on IIS 5.0 (all areas that even mention timeout) - use the "Connection Timeout=2400" string in the SqlConnection connections string - disabled connection pooling.
2
4578
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server 2000. 2. The Update is updating about 1000 - 3000 records doing simple update statements like "Update...
4
4906
by: Nick | last post by:
Hi I am a little stuck. I have a web app which uses cookieless session management. I would like to inform a user when their session has ended but cannot work out how to implement. I thought of placing a redirect into the Session_End method in the global file but this does not work. To my understanding a session will end when it has been idle for the time specified in the web.config file. The user may still have the
4
4376
by: Nevyn Twyll | last post by:
I've been working on an asp.net application and everything's been great. But suddenly, whether I'm tyring to use a database on my own machine, or on my server, I'm getting a timeout when trying to open a database connection. The error seems to happen regardless of what ASP.NET app I'm working with/trying to debug. It will open a few connections, Here's the error:
2
430
by: Chakravarti Mukesh | last post by:
Hi all, I have put some queries on the page that takes too much time to execute. Thus at the time of peak load it gives the following error. Server Error in '/ge' Application. -------------------------------------------------------------------------------- Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of...
4
13176
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying to login (obviously it's using ASPNETDB.mdf). Any ideas? Server Error in '/' Application. --------------------------------------------------------------------------------
0
2028
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. It seems that the download file code is executing before letting the previous code to finish. Even the message print code (message.Text="...";) is not executed.
1
11049
by: Jake K | last post by:
I have a system timer that elapses every 10 seconds and must execute every ten seconds. Basically every 10 seconds I need to insert into a table. The following code, however, causes a "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." error at cn.open() after about 2 minutes of executing. private...
0
8382
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
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8717
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8498
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8600
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
7311
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
4150
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...
1
2726
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
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.