Slow Performance With A Simple Query In A Small Table?

Jul 9, 2001

In my database/MY SERVER (SQL7/Win2K), I run a simple query with a Table/10000 rows (without cluster index):
SELECT * FROM TABLE
it take over 30s. Why it's slow? How can I check for reason? How to configure my server to improve performance?
Thanks in advance.
TH
----------------------------------
SP_CONFIGURE's RESULT in MY SERVER
----------------------------------

Table 'spt_values'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0.
name minimum maximum config_value run_value
----------------------------------- ----------- ----------- ------------ -----------
affinity mask 0 2147483647 0 0
allow updates 0 1 1 1
cost threshold for parallelism 0 32767 5 5
cursor threshold -1 2147483647 -1 -1
default language 0 9999 0 0
default sortorder id 0 255 52 52
extended memory size (MB) 0 2147483647 0 0
fill factor (%) 0 100 0 0
index create memory (KB) 704 1600000 0 0
language in cache 3 100 3 3
language neutral full-text 0 1 0 0
lightweight pooling 0 1 0 0
locks 5000 2147483647 0 0
max async IO 1 255 32 32
max degree of parallelism 0 32 0 0
max server memory (MB) 4 2147483647 2147483647 2147483647
max text repl size (B) 0 2147483647 65536 65536
max worker threads 10 1024 255 255
media retention 0 365 0 0
min memory per query (KB) 512 2147483647 1024 1024
min server memory (MB) 0 2147483647 0 0
nested triggers 0 1 1 1
network packet size (B) 512 65535 4096 4096
open objects 0 2147483647 0 0
priority boost 0 1 1 1
query governor cost limit 0 2147483647 0 0
query wait (s) -1 2147483647 -1 -1
recovery interval (min) 0 32767 0 0
remote access 0 1 1 1
remote login timeout (s) 0 2147483647 5 5
remote proc trans 0 1 0 0
remote query timeout (s) 0 2147483647 0 0
resource timeout (s) 5 2147483647 10 10
scan for startup procs 0 1 0 0
set working set size 0 1 0 0
show advanced options 0 1 1 1
spin counter 1 2147483647 10000 10000
time slice (ms) 50 1000 100 100
two digit year cutoff 1753 9999 2049 2049
Unicode comparison style 0 2147483647 196609 196609
Unicode locale id 0 2147483647 1033 1033
user connections 0 32767 0 0
user options 0 4095 0 0

Table 'spt_values'. Scan count 43, logical reads 108, physical reads 0, read-ahead reads 0.
Table 'sysconfigures'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 2.

View 4 Replies


ADVERTISEMENT

Large Table/slow Query/ Can Performance Be Improved?

Jul 20, 2005

I am having performance issues on a SQL query in Access. My query isaccessing and joining several tables (one very large one). The tables arelinked ODBC. The client submits the query to the server, separated byseveral states. It appears the query is retrieving gigs of data from thetable and processing the joins on the client. Is there away to perform moreof the work on the server there by minimizing the amount of extraneous tabledata moving across the network and improving performance (woefully slowabout 6 hours)?

View 3 Replies View Related

Very Small Table Incredibly Slow

Jul 23, 2005

Hello.I am administering a SQL Server (Enterprise Edition on Windows 2003)from some month and can't understand what is going on in the latestweek (when the db grow a lot).The DB is around 250G, and has one table with 1 billion rows. It isperforming in a decent way, but can't understand why a particolar tablehas strong performance problem.I have a stored procedure that read table from table A and insert them,after processing in table B, and then move them in other table (similarto a Star Schema) for reporting.Table B is, for how the SP is written, not more than 3000 lines. TableB is very simple, has 3 rows, and no index.What is very strange is that performance of table B is really slow. IfI do a select count (*) from table_b it takes between 30s & 2minutes toreturn it has 0 lines. When the stored procedure insert 1000 lines, ittakes 20/30 seconds and it takes 20/30 seconds to delete them.To me it doesn't look like a lock problem, because it is slow also whenthe only procedure that access that table are stopped. I did an updatestatistics with fullscan on this table with no improvement.The DB is on a Storage Area Network that should perform decently. TheLUN I use is configured to use a piece of 32 disk that are used also byother application. I don't have performance data of the SAN. Themachine is an HP DL580 with 4 CPU (hiperthreading disabled), 8G of RAM,AWE and PAE and 5G reserved for SQL Server.I don't know what to do to solve this situation. Could it be a"corruption problem" that slow this table so much? is it possible thefact the db grow a lot in the last week created problem also to thissmall and simple table?Do you have any idea or hint on how to manage this situation, orpointer to documentation that can help in analizing this situation?For the ones that arrived till here, thank you for your time andpatience reading my bad english...Best Regards,MamoPSI can't rewrite the stored procedure, because it is part of a closedsource product.

View 16 Replies View Related

Simple Insert Query VERY Slow !

Mar 7, 2005

Hello,

I don't know what to do anymore ;o(

I've got 2 servers, with sql server 2000 sp3 and ms windows 2003 server.
I've written a very simple stored procedure to insert 20,000 rows into a very simple table TEST (id int, msg varchar_50)

On the first server (P-IV 2 GHz), it takes 700 ms / 1000 insertions
and on the second (2x Xeon 2,6 GHz), it takes 13 s / 1000 insertions...

(insertion is : INSERT INTO TEST (id, msg) VALUES (@id, 'dummy text'))

...



SQL Server was installed exactly in the same way...

what could I do see where the problem is ? With profiler, I see no difference while logging all events....

please help or give ideas

View 1 Replies View Related

Slow Report From Simple Query

Apr 2, 2007

Hi all, I've been building a set of traffic based reports on our website and I've run into a strange problem.

The reports are pretty basic, and up till now I've been really impressed with RS overall.

Recently I've added a StartDate and EndDate and since then the performance has gone from ~10 secs to ~10 minutes.

I've taken a really simple query from my reports. Running this query in Management Studio on the same data returns in less than a second. When its run from a test report with nothing else in it it takes ~1 minute. Even stranger when I run the same query with the same values for parameters inside of RS in the data view it takes less than 1 second. ARG!


SELECT COUNT(DISTINCT SessionID) as Occurences
FROM WebAppSummary
JOIN WebAppLocalizations
ON WebAppSummary.ClientIp = WebAppLocalizations.ClientIp
where FirstTime BETWEEN @StartDate AND @EndDate


The last line that was just added is this part:
where FirstTime BETWEEN @StartDate AND @EndDate

So whats going on here? Is this a really poorly performing query that management studio is optimizing but RS isnt? Is RS messing up the databind and getting a bunch of DSs instead of just one?

View 1 Replies View Related

Do Views Slow Down Query Performance?

Oct 22, 2004

When working with databases containing myriad of huge tables, I am very much tempted to create categorized views on those tables in order to simplify and facilitate data query programming? Some developers I talk to say such views generally slow down query performance. Is this true?
Thanks.

View 1 Replies View Related

Slow Performance When Making A Query

Aug 1, 2005

I have a table with about 20,000 records.  So, to minimise performance issues, i try to only retrieve the top 100 records.  The databaset retrieved can be paged and sorted.  Below is my code, but it's taking quite a while even to only load the 100 records.  Any suggestions?Private Sub BindGrid()        Dim connectionString As String = "MyConnectionString"        Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
         Dim queryString As String = "SELECT TOP 100 [Person].* FROM [Person] ORDER BY " & viewstate("sortField").ToString() & " " & viewstate("sortDirection").ToString()
        Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand        dbCommand.CommandText = queryString        dbCommand.Connection = dbConnection
        Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter        dataAdapter.SelectCommand = dbCommand        Dim dataSet As System.Data.DataSet = New System.Data.DataSet        dataAdapter.Fill(dataSet)
        Try           DataGrid1.DataSource = dataSet           DataGrid1.Databind()        Catch e As Exception           DataGrid1.CurrentPageIndex = 0        End TryEnd Sub

View 1 Replies View Related

Slow Performance On Specific Query

Jul 23, 2005

Hi,Can't post specifics at the moment but if this seems like a commonproblem any help would be appreciated.When querying with ~6 tables, using mostly left outer joins, I getstandard performance with the where clausewhere XXX is not nullhowever, if I try the clausewhere XXX = 4the query takes upwards of 5-6 minutes (I just stop it running at thatpoint.The field XXX is in the 'main' table (to which the joins attach), it'san integer field too so I can't see too many problems there.There's no index on the XXX field, but if I remove the joins, I getstandard performance doing either query.So why would the second query's performance differ so significantly?Cheers,Chris

View 3 Replies View Related

Query Too Slow! Need Some Performance Enhancing Tips!

Jul 20, 2005

I have a stored procedure that queries a database using a Selectstatement with some inner joins and conditions. With over 9 millionrecords it takes 1 min 36 sec to complete. This is too slow for myrequirements.Is there any way I can optimize this query. I have thought aboutusing an indexed view. I haven't done one before, does anyone know ifthis would have potential to improve performance or indeed any otherperformance enhancing techniques I might try.SELECT vehicle.vehicle_idFROM (( [vehicle]INNER JOIN [vehicle_subj_item_assn] onvehicle.vehicle_id=[vehicle_subj_item_assn].vehicle_id)INNER JOIN [subj_item] on[vehicle_subj_item_assn].subj_item_id=[subj_item].subj_item_id)INNER JOIN [template_field] on[subj_item].subj_item_id=[template_field].subj_attr_idWHERE([template_field].template_field_id=@template_field_id) AND([template_field].template_field_type_id=3) AND([vehicle_subj_item_assn].subj_item_value_text=@value) AND(vehicle.end_dtm IS NOT NULL)ThanksGavin

View 3 Replies View Related

SLOW Performance On Table With Image Fields (SQL 2000)

Nov 15, 2006

HiWe have a SQL server 2000 SP4 on a windows 2003 2x3Ghz XEON 4 GB ram.We have a table looking like this with currently 6 rows. Total data is aprox10 kb i all row all together.CREATE TABLE [dbo].[BIOMETRICPROFILE] ([BIOMETRICPROFILEID] [bigint] IDENTITY (1, 1) NOT NULL ,[FINGERPRINTTEMPLATE1] [image] NOT NULL ,[FINGERPRINTTEMPLATE2] [image] NOT NULL ,[FINGERPRINTTEMPLATE3] [image] NOT NULL ,[FINGERPRINTTEMPLATE4] [image] NOT NULL ,[FINGERPRINTTEMPLATE5] [image] NOT NULL ,[FINGERPRINTTEMPLATE6] [image] NOT NULL ,[TYPE] [nvarchar] (50) COLLATE Danish_Norwegian_CI_AS NOT NULL) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]GOselect * from BIOMETRICPROFILE takes ~4 seconds (!) to execute thourgh Queryanalyzer. Alle other tables has no performance problems.We have a SQL 2005 express instalation on the same server. If we restore abackup from the sql 2000 database the query takes aprox ~ 15 ms.What isgoing on here?Has SQL 2000 problems with image fields? or how can we find the problem?RegardsAnders

View 2 Replies View Related

SQL Express Running Slow On Small Business Server

Jan 5, 2007

Hi

We have SQL Express running very slowly on Small Business Server. Does
anyone know if there is a conflict between the two? Or any ideas on how
to solve our problem?

(Autoclose is set to
false)



Thanks

View 1 Replies View Related

Suggestions For A Small Database Layout...Very Simple

Jul 20, 2005

Hi ng,I need some input/suggestions for a very small layout.The situation: Some groupings of thumbnails. For every picture (thumbnail)there is a "big" picture. Thats it basically :) On the front the scenario isthis:A user clicks "Autumn". The user is presented with the "Autumn" thumbnails.If he click a thumbnail, the corresponding big image is displayed. Well, uget the picture :)Hoe is this most efficiently implemented in table-layout? I mean....do Icreate a table called "images" and have a column called "is_thumb"? Or do Ibetter make 2 tables...Or better make a "relation/type" table too?--?Thanks,/Summa

View 4 Replies View Related

Small SQL Shop - SQL Config For Performance

Dec 11, 2007

We are relatively new to the setup, configuration and use of MS SQL. We are currently using MS SQL2000, Our sql application performance as become very slow. I am trying to find some basic "beginner" steps that I can take to improve performance and quicker lookups. Some of the things I have heard but I am not sure what they mean or how to do them are:
1) Locate SQL Temp files onto another drive, will this help and which/what temp files
2) should i put the mdf ldf files onto a separate drive?
3) Put Sql server program on a seperate drive?
4) our ldf file size is about 2GB is that OK any suggestions
Any other basic suggestions to improve performance and throughput is appreciated

www.accellus.com

View 4 Replies View Related

Problem With Managed Code Simple Example Target String Size Is Too Small To Represent The XML Instance

Feb 10, 2006



I am trying to understand creating SQL Server projects and managed code. So I created a C# SQL Server Database project and named it "CSharpSqlServerProject1" and followed the steps in the following "How to: " from the Help files:

"How to: Create and Run a CLR SQL Server Stored Procedure "

I used the exact code in this "How to: " for creating a SQL Server managed code stored procedure (see below) in C#. However it didn't even compile! When I went to build the code I got the following error message:

"Error 1 Target string size is too small to represent the XML instance CSharpSqlServerProject1"

It does not give a line number or any further information! Since this is a Microsoft example I'm following I figure others must have run into this too. I can't figure out how to fix it!

Here's the code as copied directly from the howto:

using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;

public partial class StoredProcedures
{
[SqlProcedure()]
public static void InsertCurrency_CS(
SqlString currencyCode, SqlString name)
{
using (SqlConnection conn = new SqlConnection("context connection=true"))
{
SqlCommand InsertCurrencyCommand = new SqlCommand();

InsertCurrencyCommand.CommandText =
"insert Sales.Currency (CurrencyCode, Name, ModifiedDate)" +
" values('" + currencyCode.ToString() +
"', '" + name.ToString() +
"', '" + System.DateTime.Now.ToString() + "')";

InsertCurrencyCommand.Connection = conn;

conn.Open();
InsertCurrencyCommand.ExecuteNonQuery();
conn.Close();
}
}
}


Thanks for any help you can give!

View 7 Replies View Related

Slow Query With Table Containing Image

Sep 25, 2007

Hi,

I have a table defined as such:
PosterArtId int no 4 10 0 no (n/a) (n/a) NULL
Graphic image no 16 yes (n/a) (n/a) NULL
GraphicFilename varchar no 50 no no no SQL_Latin1_General_CP1_CI_AS

I have a Stored Procedure defined in the database that queries this table (joins with some other tables) that takes about 1 1/2 minutes to return results (running directly in query analyzer). The table itself has 8900 records and the resulting stored procedure returns 33 rows.

I have backed up this database and restored it to another database on a different machine also running SQL Server 2000. When I run the same stored procedure on this 2nd database (note the contents of the database and this table are exactly the same), it runs very quickly - in about 2 seconds.

I'm trying to figure out what is causing the query to run so slow on the original database, which is our production database server (note that none of the other queries seem to be running extra slow on this machine, just this particular one).

I've since been reading up on storing images in the database and I don't think the images are stored "text in row" - I ran the command: €œSELECT OBJECTPROPERTY(OBJECT_ID('tblPosterArt'),'TableTextInRowLimit')€? and got a 0 return value.

My ultimate goal is to figure out:
1) why the timing is so different on the two databases even though the have the same data
2) is there something we can do to speed up the results on our production server

For the first goal, I'm heading down the path that something in the database backup/restore did not recreate the btree storage of the image data in the same manner. Would this be correct? If not, is there some kind of analysis that I can do that will tell me some useful information?

I've run the Stored Procedure for both databases in query analyzer with the "show execution plan", "trace", and "statistics" turned on. In the Execution Plan of the production database I see a significant amount of time in three areas: Nested Loops/Left Semi Join, Clustered Index Scan, and Clustered Index Seek. But being as I'm not a dba (nor do we have one on staff), I'm not sure how to interpret this data. I keep wanting to point to some sort of environment issue since the data is the same between the two machines.

I suppose there is nothing to do about the 2nd goal without knowing why the query on the one machine is taking so long. Any thoughts on how to get more information here?

Thanks,
Beth

View 8 Replies View Related

Very Slow Query (select Count(*) From Table)

Feb 15, 2006

Dear MS SQL Experts,I have to get the number of datasets within several tables in my MSSQL2000 SP4 database.Beyond these tables is one table with about 13 million entries.If I perform a "select count(*) from table" it takes about 1-2 min toperform that task.Since I know other databases like MySQL which take less than 1 sec forthe same taskI'm wondering whether I have a bug in my software or whether there areother mechanisms to get the number of datasets for tables or the numberof datasets within the whole database.Can you give me some hints ?Best regards,Daniel Wetzler

View 5 Replies View Related

Why Is A Simple WHERE Clause So Slow?

Jan 12, 2007

Dear Experts,I have a fairly simple query in which adding a where clause slowsthings down by at least a factor of 100. The following is the slowversion of the query-------------------------SELECT * FROM( Select x.event_date From x FULL OUTER JOIN yON x.event_date = y.event_date) innerQWHERE ( innerQ.event_date >= {ts '1980-01-01 00:00:00'} )------------------------Removing the where clause makes the query run quickly. This seemsextremely strange because it seems like SQL Server should simply beable to take the results of innerQ and discard anything with a datethat doesn't match. If I instead split the query into two pieces whereI create a temp table and put innerQ into that and then do the select *WHERE (...) from the temp table things work fine.Any thoughts on what SQL Server might be doing to make things slow andhow I can fix it?Thanks,-Emin

View 9 Replies View Related

Simple 3 Table Query Failing.

Aug 25, 2005

I have a database with three tablestbl_listings - listings of houses on for saletbl_intersted - table which tracks if a user is interested in thelisting, it has two columns mls(the key for tbl_listings) and user(userlogin)tbl_review - table which trackes if a user has reviewed the listing.Like tbl_interested it has two columns (the key for tbl_listings) anduser(user login)How can I create a query on tbl_listings for reocords reviewed by oneuser?I am trying to create a query for listings that are revied by useruserid. I am using the query below. It works fine unless there is arecord in tbl_interested for a differnt user.In reality I am calling this query from the web. On the website I havean intersted dropdown with the choices All, interested, not interested.The website also has a reviewed dropdown with all, reviewed and notreviewed.I am using the query below as a starting point. my query works finewith one user, but if a user2 enters a record in tbl_intersted itthrows off the left join for user1. How can I fix this?SELECT COUNT(B.reviewed) AS review_count,Count(B.mls) as mls_count,A.mls,FROM mls.tbl_listings ALEFT OUTER JOIN mls.tbl_review B ON A.mls = B.mlsLEFT OUTER JOIN mls.tbl_interested D ON A.mls = D.mlswhere (B.reviewed = 'userid') and ((D.interested is null) or(D.interested = 'userid'))----My query works fine if there is one user, however once user2 reviews arecord from tbl_listing user1

View 2 Replies View Related

Simple (for Some) 2 Table Summary Query

Jul 10, 2006

...but apparently not me, I'm very new with this T-SQL stuff and am seeking the advice of the seasoned pros at this forum.

Description on my SQL-5 Environment:

Table I Sales:       Prod_ID, Prod_DT, Sales_DT, Buyer_Name, Buyer_State

Table II Repairs:   Prod_ID, Prod_DT, Sales_DT, Repair_DT

These 2 tables are joined by the common key Prod_ID & also and share the product's production & sales dates. What I would like to do is produce a rate summary similar to description below.

Production_YYYY, Production_MM,  Sales_Cnt, Repairs_Cnt, Repair_Rate((Repairs_CNT/Sales_CNT)*100)

Important to remember that not all products experience repairs, so the basis for Sales_CNT needs to be the Sales Table, even thou Prod_DT also appears in Repairs Table.





It's simple enough for novice like me to produce 2 tables independently and then merge back those resulting tables into the single table output described above. But my question is how do I write a single SQL "SELECT" request that will produce the results into just a single table.

Thanks in advance for your help!

 

View 6 Replies View Related

Simple SQL Query- Exchanging IntegerID With Name From Other Table.

Apr 17, 2008

 Hi Guys,I have the following query: SELECT DecisionSessionID, RuleID, Operator1, Criteria1, AttributeForCriteria1, Operator2, Criteria2, AttributeForCriteria2, Operator3, Criteria3,
AttributeForCriteria3, Result
FROM myTable
WHERE (SessionID = @SessionID) Now I want that instead of the complicated Criteria1, Crieria 2 and Criteria 3 values the users sees the names whichare defined in myCriteria. I though the query might then look like this SELECT
DecisionSessionID,
RuleID,
Operator1,
Criteria1 (SELECT CriteriaName FROM myCriteria WHERE Criteria1 = CriteriaID),
AttributeForCriteria1,
Operator2,
Criteria2 (SELECT CriteriaName FROM myCriteria WHERE Criteria2 = CriteriaID).
AttributeForCriteria2,
Operator3,
Criteria3 (SELECT CriteriaName FROM myCriteria WHERE Criteria3 = CriteriaID),
AttributeForCriteria3,
Result
FROM dbo.aspnet_FuzzyRules
WHERE (DecisionSessionID = @DecisionSessionID) I am not very familiar with the sql syntax and as you can imagine the above psyeudo version is not really working.Do you know how the correct syntax for such a nested query would look like?many thanks,polynaux

View 2 Replies View Related

Query To Search All Fields In Simple Table

Mar 1, 2006

I am trying to write a simple search page that will search all the fields in a database to find all records that match a user input string.  The string could happen anywhere in any of the fields.  I have a dataset and can write a query but am unsure what the format is for this simple task. I figured it would look like this:
 
SELECT Table.*
FROM Table
WHERE * = @USERINPUT 
But thats not working.  Can someone help.?  Thanks..

View 1 Replies View Related

How To I Enter A Small Square Or A Small Circle In A NVARCHAR Field?

Dec 25, 2006

I want to store a small cirle in a text field. Can anyone tell me how I can enter it in ascii code.

Thanks

View 4 Replies View Related

SQL Server Express Excruciatingly Slow With Simple Quries

Mar 10, 2008



I am running simple queries against test SQL Express installation and they take a very long time to return data. I have two SQL Express instances installed on colleagues' machines to which I connect for my testing and both exhibit the same problem. The setup is Windows XP SP 2 with 2 GB RAM and 3.6 GHz CPU. I am querying a table with around 7000 records and my query is simply SELECT TOP 1000 * FROM MyTable. It takes over 10 seconds to return the recordset!



I have done the research and found posts, which talk about AUTO_CLOSE option, indexes, query execution plan, etc. I have done everything those posts recommend, but performance is still terrible. All the instances have SQL 2005 SP2 applied.



I also found that the query runs fast locally on each SQL Express instance, the problem seem to happen when I am trying to pull the data over the network.



I am really not sure what else to look for.



Thank you,



Michael

View 1 Replies View Related

Slow Performance

Mar 24, 2007

Hi all...
 
I  need urgent help, about someting:
i've developed and deploy an aspnet web site (data works with sqlserver), but after a few minutes working with some users, the permormance slows and  stop the site.
 
please help me what should i do......

View 3 Replies View Related

Slow Performance Using DTS Sql 7

Mar 30, 2000

I need to transfer a database from one server to another, I'm using the DTS utility because the servers have different sort orders. our database size is about 5GB which include about 2500 tables. Using DTS is taking many hours to transfer all objects and data. is there a better/faster way to do this?
Any help would be appreciated, Thank you

View 3 Replies View Related

Slow Performance

Mar 31, 1999

Help! I am new to SQL (6.5) and am designing a small database on a small LAN.
Everything seems to work fine until more than one user gets in the database.
It was originally an Access database and we upsized some of the information to SQL.
I have not upsized all the tables yet, and am not sure if that is causing a problem.
Since we are new to SQL we are trying to make all the changes in Access then upsize
everything. If this is the problem though, I will not be hesitant in upsizing.

Any ideas?

View 1 Replies View Related

Slow Performance With Sp2

Dec 27, 2001

Since sp2 a number of applications, specifically web ado access has slowed very badly and I seem to be seeing a high cpu usage too. Internal jobs such as backups and table defrags are not affected. I'm on a 4 way box with ample hardware .. stats indexes etc. are fine .. client access is just slow. I suspect mdac but I can't pin anything down and it's driving me crazy !!!!!
I've even built a new box with a fresh install but to no avail.
help ???

View 3 Replies View Related

Not Again - Slow T-SQL Performance

Aug 24, 2004

I'm running the following statements. They have been running for 48 hours and counting... In performance monitor, I can see the system is steadily 100% disc bound. Any idea how to get status or ETA on these? Any idea how I can speed up such actions? This seems unusually slow. There are no errors in the Error Log. Does other DBMS systems (such as Oracle) handle such scenarios more quickly or with better status information?


INSERT INTO Domains (Domain)
SELECT DISTINCT Domain FROM Stages WHERE Domain NOT IN (SELECT Domain FROM Domains)

UPDATE Stages SET DomainID = (SELECT Domains.[ID] FROM Domains WHERE Domains.Domain = Stages.Domain)


Stages is 173 million records
Domains is 2.4 million records

This is running on pretty decent hardware:
Windows 2000 SP5
SQL Server 2000 Enterprise Edition SP3a
Dual 3.06 GHz Xeons with HyperThreading enabled (4 virtual CPUs)
4GB RAM (OS 3GB switch is enabled to give SQL Server 3GB of RAM)
70GB SCSI boot drive
Data/Transaction Log is on a RAID 5, 30 spindle, fibrechannel SAN

View 14 Replies View Related

Slow Performance

Aug 30, 2006

Hi - I have MS SBA2007beta and Office Outlook 2007 BCM Beta. Both use SQL2005 and they are both as slow to point of being frustrating. Outlook2007 without BCM is fine and every other application runs fine if no SQL server apps are present.

I have this running on a 2.8ghz desktop with 1G memory and a Laptop of 1.8ghz and 1.5g memory. The laptop is far faster.

When SQL apps are running everything is slowed.

View 1 Replies View Related

Slow Performance Using A View.

Jan 31, 2000

Hello,

I have the same database on two different servers. One for production and one for testing. A view that I use runs in less than 2 seconds on the test system, but takes almost 2 minutes on the production server.

What I have noticed is on the test server the view will use an index. The production server ends up scanning a whole table. All indices are the same on both machines for the tables involved and I have updated the statistics. I even went through the process of creating a new table with its indices for the table that is being scanned. Both machines have had service pack 1 installed on them.

Any ideas?

View 1 Replies View Related

Locks And Slow Performance

Jan 28, 2003

An Application Times out with tons of SQL Server Locks but there is no log of any errors in SQL Servers. I checked all the Indexes and I reindex it but still same issues. CPU is 100% full at that time and users unable to do anything. Any ideas on how to fix it

View 1 Replies View Related

Slow Performance In Sql Server

Jun 5, 2004

Hi

We are facing performance related problem using Sql server 2000.

We have one stand alone P4 Pc (128 ram) and around 30 users access the sql server through network.

We have written our aplication in VB 6 and backend as Sql Server 2000. We have used Stored Procedure where ever necessary. We have used cursor location as Server side.

When we start with 5 users it is not slow, when all the users say 30 comes in it is slow down.

Can some one help to find out what is the problem.

Thanks

View 1 Replies View Related

Help With SLOW SQL Server Performance

Nov 29, 2005

I'm still new to SQL Server so some of my lingo/verbage may be incorrect, please bare with me.

The company I work for relies strictly on ASP and SQL Server for 85% of it's daily operations. We have some Access projects and some VB projects as well, but for the majority it's ASP and SQL Server.

Previously we had 2 T1 lines with something like 3MB a piece and a handfull of Dell Servers. Our main server is also a Dell running Windows Server 2003 and is hosted through a reputable company here in town. They have a host of fiber lines running all over so I know we're getting good throughput. We've actually just upgradded to a DS3 but we're still working out the kinks with that. Anyway, I just want to eliminate that up front - we have great connection speeds.

The problems lies, I believe in our database design. The company supposedly had a DBA come in and help setup the design some 3 or 4 years ago, however even with my limited knowledge I feel like something is just not working right.

Our main table is "Invoices" which is obviously all of our Invoices, ever. This table has an Identity field "JobID" which is also the Clustered Index. We have other Indexes as well, but it appears they're just scattered about. The table probably 30-40 fields per row and ONLY 740,000 rows. Tiny in comparison to what I'm told SQL Server can handle.

However, our performance is embarassing. We've just landed a new client who's going to be brining us big business and they're already complaining about the speed of their website. I am just trying to figure out ways to speed things up. SQL is on a dedicated machine I believe with dual Xeon processors and a couple gigs of ram. So that should be ok. THe invoices table I spoke of is constantly accessed by all kinds of operations as it's heart of what we do. We also have other tables such which are joined on this table to make up the reporting we do for clients.

So I guess my question is this. Should the Clustered Index be the identify field and is that causing us problems? We use this field alot for access a single Invoice at a time and from what I understand this makes it a good Clustered Index, because the index IS the jobID we're looking for. But when it comes time to do reporting for a client, we're not looking at this field. We just pull the records for that Clients Number. And we only have 1400 clients at this point. So if we were to make the "ClientID" field the Clustered Index, it would much faster to Zero in on the group of Invoices we wanted because the ClientID is ALWAYS included in our queries.

But because a "DBA" came in to design this setup, everyone is afraid to change it. I guess it's hard to explain without people sitting here going through the code and look at the structures of all our tables - but I guess what I need is like a guide of what to do to easily increase performance on SQL Server and the proper use of Clustered and Non-Clustered Indexs and how to mix and match those.

Sorry I wrote a book.
Ideas? This place has always helped me before, so thanks in advance!

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved