DB Slow On Server But Fast On Desktop

Apr 2, 2008

I'm trying to figure out how to determine why the same database is fast on my desktop but slow on a robust multiprocessor win2003 server.

I have a complex proc that takes about 27 seconds on my desktop sql server but takes almost 5 minutes on the server. The server processors are running at about 1% utilization while the proc is running.

Any ideas on how to troubleshoot this extremely poor performance?

View 8 Replies


ADVERTISEMENT

Query Slow On Client, Fast On Server

Feb 15, 2006

I have a very unusual situation - we converted a client from DB2 7.2 to MS SQL Server 2000, SP3. There is one report that runs very quickly when ran on the Database Server, but it takes a long time to complete when it is ran from a client system. This query is ran from within the application and not from within Query Analyzer.

Has anyone else here ever encountered this issue? What did it turn out to be? I am leaning away from it being a network issue.

Thanks in advance.

View 2 Replies View Related

Package Fast In VS But Slow When Deployed To Server

Sep 20, 2007

I have a package which completes in 3 minutes when ran from Visual Studio but when deployed to SSIS (same machine) it rans for more than 2 hours. What could be the reason for this?

View 4 Replies View Related

Remote Scan On Linked Server - Fast SELECT/Slow UPDATE

Aug 14, 2001

In an ASP, I have a dynamically created SQL statement that amounts to "SELECT * FROM Server1.myDB.dbo.myTable WHERE Col1 = 1" (Col1 is the table's primary key). It returns the data immediately when executed.

However, when the same record is updated with "UPDATE Server1.myDB.dbo.myTable SET Comments = 'blah blah blah' WHERE Col1 = 1", the page times out before the query can complete.

I watched the program in Profiler, and I saw on the update that sp_cursorfetch was being executed as an RPC once per each row in the table. In a table of 78000 records, the timeout occurs well before the last record is fetched, and the update bombs.

I can run the same statements in Query Analyzer from a linked server and have the same results. The execution plan shows that a Remote Query is occurring on the select that returns 1 row, and a Remote Scan is taking place on the update scanning 78000 rows (I guess this is where all the sp_cursorfetch calls are happening...?).

How can I prevent the Remote Scan? How can I prevent the execution of the RPC sp_cursorfetch for each row in the remote table?

Thank you!

View 2 Replies View Related

Form Slow, Then Fast

Oct 16, 2005

I have a very puzzling situation with a database. It's an Access 2000 mdbwith a SQL 7 back end, with forms bound using ODBC linked tables. At ourremote location (accessed via a T1 line) the time it took to go to a recordwas very slow. The go to mechanism was a box that the user typed the indexvalue into a combo box, with very simple code attached:with me.RecordsetClone.FindFirst "[Index] = " & me.cboGoToIf Not .NoMatch ThenMe.Bookmark = .BookmarkEnd Ifend withNow, one would say that going to a record is slow because I'm using..FindFirst over a T1 line. And that's what I thought. However, as I wasworking with the form, commenting out various sections not related to the GoTo, I found that the Go To functionality changed, though I didn't modify thecode.Previously, going to a record near the end of the 50,000 record recordsettook about 1-2 seconds, but going to a record near the beginning, took about20 seconds. After the form changed, going to any record in the recordsettook about 1-2 seconds.So the question remains: why did it take so long to go to a record near thebeginning of the recordset, but not near the end (and the ones in the middletook an amount of time about halfway between the two), and what changed sothat now the form is working fine for all records?I've compared the changed form with the previous copy, and I don't see anydifferences. I've compared all code in the form module, and I've comparedall form properties. The forms are identical as far as I could tell. Butsomething happened as I was commenting/uncommenting code in the form thatgot rid of the problem with it taking a long time to go to some of therecords.My first thought was that something got recompiled, and now the form isfast. So I went back to the original version and changed some code andrecompiled, also did a compact and repair. But it was still slow. I alsotried doing an explicit decompile and then recompiled it. But it was stillslow.So this is very frustrating that the form is now working fine, but I can'tsee anything that's changed. If I don't see why the form is now fast, thenthere's no reason to believe that it might not at some point go back tobeing slow again. And then I'd just have to hope that something changes. Itwould be good to figure this out.Any ideas as to what might have changed here to cause the form's Go To to befast would be appreciated.Thanks,Neil

View 8 Replies View Related

Job Activity = Slow, Non Job = Fast

Oct 10, 2006

I have created an integration services package with a script-source reading data from Active directory. Pretty much data is read and written into a sql2005 database.

I have notised that when I run the package via right-clicking the package (Under stored packagesMSDB) and selecting "Run Package" it takes about 45 minutes for it to complete successfully. The same goes if I run the package from inside Visual Studio. However, when I create a job and put this package as one of it's tasks the task takes about 1h 40min. This is more then double the time! In neither case the server is occupied with soething else. And I have tried it several times so it wasn't just an "accident".

Any idéa of what this depends on?

regards Andreas

View 9 Replies View Related

2 Identically Databases - 1 Is Fast And 1 Is Slow

Jul 29, 2005

Hi!
we've got a curious problem. we've two identicall databases, same tables, same date, same indexes, same server, both replicated.
One of them is our life database and the other is our development database. If I execute the following query at the development database the query takes less then one second. If I execute the same query at the live database the query takes about 4 seconds to complete. This is very unsatisfactory!!
What I've noticed is, if I try to analyze the query in the tuning advisor on the developement database it completes without tuning tips. If I do the same on the live database I get the following error:
TITLE: DTAEngine

View 4 Replies View Related

Sql View Very Very Slow The First Run And Then Super Fast... Why?

Nov 2, 2007

Hi,
I have a query that takes 15minutes to run the first time after sql server start but then for subsequent querys is superfast (less than 10 secs).
Why? What could I do to speed up the first run?
Here is the source:



Code Block
SELECT Articoli.Articolo, Articoli.BarCodeVen, Articoli.Descri, Articoli.Merce, Articoli.CodIVA, Articoli.UMBase, Articoli.PrzBase, Articoli.Sconto1, Articoli.Sconto2,
Articoli.ScontoFormula, Articoli.Ricarico, Articoli.TipoArt, Articoli.CatMerc, Articoli.CatOmo, Articoli.CatProvv, Articoli.CntrprtVen, Articoli.CntrprtAcq,
Articoli.Dispniblta, Articoli.Vendita, Articoli.SiCli, Articoli.SiFor, Articoli.NotaPriv, Articoli.NotaPubb, Articoli.Immagine, Articoli.Produttore, Articoli.SiMatr,
Articoli.OldCodArt, Articoli.Disattivo, Articoli.CatProd, Articoli.SotCatProd, Articoli.EsplKit, Articoli.ScaricoCom, Articoli.ImmagLun, Articoli.DataModCS,
Articoli.ValorizPr, Articoli.Natura, Articoli.UMSecScelta, Articoli.SecScelta, Articoli.Acquisto, Articoli.CntConsumi, Articoli.NonMovimentabile,
Articoli.ProvAgente, Articoli.Taglia, Articoli.Colore, Articoli.CodArtNeutro, Articoli.Collezione, Articoli.Assortimento, Articoli.Centro,
Articoli.InibisciRicercaUnMis, Articoli.Commessa, Articoli.DescriTesto, Articoli.Disattivabile, Articoli.KwTipoArt, Articoli.KwTipoArtNeutro,
Articoli.KwNeutro, Articoli.KwCollezione, Articoli.KwLinea, Articoli.KwModello, Articoli.KwMateriale, Articoli.KwComposizione, Articoli.KwPosRiga,
Articoli.KwVarRiga, Articoli.KwPosColonna, Articoli.KwVarColonna, Articoli.KwPos3D, Articoli.KwVar3D, Articoli.KwGrpVarRiga, Articoli.KwGrpVarColonna,
Articoli.KwGrpVar3D, Articoli.KwEtiMan, Articoli.KwAssortimento, Articoli.KwGrpFormule, Articoli.KwSpecimen, KwVarArticolo.TipoVariante,
KwVarArticolo.Variante, KwVarArticolo.Posizione, KwVarArticolo.Categoria, KwVarArticolo.DescriVariante,
KwVarArticolo.P07009Descrizione1 AS Descrizione1, KwVarArticolo.P07009Descrizione2 AS Descrizione2, CatOmo.Descri AS CatOmoDescri,
KwModelli.Descri AS DescriModello, KwMateriali.Descri AS DescriMateriale, MFDBCompon_Tomaia2.DatoTecnico,
MFDBCompon_Tomaia2.DBPosColonna, MFDBCompon_Tomaia2.DBPos3D, MFDBCompon_Tomaia2.CompNeutro,
MFDBCompon_Tomaia2.CompVarRiga, Articoli_1.Descri AS DescriCompNeutro, MFKwVariantiRiga.DescriVariante AS DescriRigaCompo,
CatProvv.Descri AS CatProvvDescri, MFDBCompon_Tomaia3.CompNeutro AS CompNeutroT3,
MFDBCompon_Tomaia3.CompVarRiga AS CompVarrigaT3, Articoli_2.Descri AS DescriCompNeutroT3,
MFKwVariantiRiga_1.DescriVariante AS DescriRigaCompoT3, MFDBCompon_Acc1.CompNeutro AS CompNeutroAcc1,
MFDBCompon_Acc1.CompVarRiga AS CompVarRigaAcc1, Articoli_3.Descri AS DescriCompNeutroAcc1,
MFKwVariantiRiga_2.DescriVariante AS DescriRigaCompoAcc1, MFDBCompon_Acc2.CompNeutro AS CompNeutroAcc2,
MFDBCompon_Acc2.CompVarRiga AS CompVarRigaAcc2, Articoli_4.Descri AS DescriCompNeutroAcc2,
MFKwVariantiRiga_3.DescriVariante AS DescriRigaCompoAcc2, MFDBCompon_SottoP_Tallonet.CompNeutro AS CompNeutroSottop,
MFDBCompon_SottoP_Tallonet.CompVarRiga AS CompVarRigaSottop, MFDBCompon_SottoP_Tallonet.DescriCompNeutroSottop,
MFDBCompon_SottoP_Tallonet.DescriRigaCompoSottop, MFDBCompon_SottoP_Tallonet.DatoTecnico AS DatoTecnicoSottop,
MFDBCompon_RicSol.CompNeutro AS CompNeutroRicSol, MFDBCompon_RicSol.CompVarRiga AS CompVarRigaRicSol,
MFDBCompon_RicSol.DescriCompNeutroRicSol, MFDBCompon_RicSol.DescriRigaCompoRicSol,
MFDBCompon_Fodera.CompNeutro AS CompNeutroFodera, MFDBCompon_Fodera.CompVarRiga AS CompVarRigaFodera,
MFDBCompon_Fodera.DescriCompNeutroFodera, MFDBCompon_Fodera.DescriRigaCompoFodera, MFDBCompon_Forma.Descri AS DescriForma,
MFDBCompon_Tacco.Descri AS DescriTacco, MFVar3D_Pos1.DescriVariante AS Descri_Pos1, MFVar3D_Pos2.DescriVariante AS Descri_Pos2,
MFVar3D_Pos3.DescriVariante AS Descri_Pos3, MFVar3D_Pos4.DescriVariante AS Descri_Pos4, MFListinoP00New.Prz AS P00,
MFListinoP00New.InVigoreDa AS DataP00, MFListinoP05New.Prz AS P05, MFListinoP05New.InVigoreDa AS DataP05, MFListinoPUSANew.Prz AS PUSA,
MFListinoPUSANew.InVigoreDa AS DataPUSA,
CASE WHEN KwVarArticolo.P07009Descrizione2 <> '' THEN KwVarArticolo.P07009Descrizione2 ELSE CASE WHEN Articoli.CatProvv = '30SPORT' THEN Articoli.KwNeutro
+ KwVarArticolo.Variante + '.jpg' ELSE Articoli.KwNeutro + '.jpg' END END AS MFFoto, MFListinoRUSANew.Prz AS RUSA,
MFListinoRUSANew.InVigoreDa AS DataRUSA, MFListinoRITANew.Prz AS RITA, MFListinoRITANew.InVigoreDa AS DataRITA, ArtMerce.Fornitore
FROM Articoli INNER JOIN
KwVarArticolo ON Articoli.Articolo = KwVarArticolo.Articolo INNER JOIN
CatOmo ON Articoli.CatOmo = CatOmo.Categoria INNER JOIN
KwMateriali ON Articoli.KwModello = KwMateriali.KwModello AND Articoli.KwMateriale = KwMateriali.KwMateriale INNER JOIN
KwModelli ON Articoli.KwModello = KwModelli.KwModello AND Articoli.KwMateriale = KwModelli.KwMateriale LEFT OUTER JOIN
ArtMerce ON Articoli.Articolo = ArtMerce.Articolo LEFT OUTER JOIN
MFListinoRUSANew ON KwVarArticolo.Variante = MFListinoRUSANew.VarRiga AND Articoli.KwNeutro = MFListinoRUSANew.Neutro LEFT OUTER JOIN
MFListinoRITANew ON KwVarArticolo.Variante = MFListinoRITANew.VarRiga AND Articoli.KwNeutro = MFListinoRITANew.Neutro LEFT OUTER JOIN
MFListinoPUSANew ON KwVarArticolo.Variante = MFListinoPUSANew.VarRiga AND Articoli.KwNeutro = MFListinoPUSANew.Neutro LEFT OUTER JOIN
MFListinoP05New ON KwVarArticolo.Variante = MFListinoP05New.VarRiga AND Articoli.KwNeutro = MFListinoP05New.Neutro LEFT OUTER JOIN
MFListinoP00New ON Articoli.KwNeutro = MFListinoP00New.Neutro AND KwVarArticolo.Variante = MFListinoP00New.VarRiga LEFT OUTER JOIN
MFVar3D_Pos4 ON Articoli.KwNeutro = MFVar3D_Pos4.Articolo LEFT OUTER JOIN
MFVar3D_Pos3 ON Articoli.KwNeutro = MFVar3D_Pos3.Articolo LEFT OUTER JOIN
MFVar3D_Pos2 ON Articoli.KwNeutro = MFVar3D_Pos2.Articolo LEFT OUTER JOIN
MFVar3D_Pos1 ON Articoli.KwNeutro = MFVar3D_Pos1.Articolo LEFT OUTER JOIN
MFDBCompon_Forma ON KwVarArticolo.Variante = MFDBCompon_Forma.DBVarRiga AND
Articoli.Articolo = MFDBCompon_Forma.DBNeutro LEFT OUTER JOIN
MFDBCompon_Tacco ON KwVarArticolo.Variante = MFDBCompon_Tacco.DBVarRiga AND
Articoli.Articolo = MFDBCompon_Tacco.DBNeutro LEFT OUTER JOIN
MFDBCompon_Fodera ON KwVarArticolo.Variante = MFDBCompon_Fodera.DBVarRiga AND
Articoli.KwNeutro = MFDBCompon_Fodera.DBNeutro LEFT OUTER JOIN
MFDBCompon_RicSol ON KwVarArticolo.Variante = MFDBCompon_RicSol.DBVarRiga AND
Articoli.KwNeutro = MFDBCompon_RicSol.DBNeutro LEFT OUTER JOIN
MFDBCompon_SottoP_Tallonet ON KwVarArticolo.Variante = MFDBCompon_SottoP_Tallonet.DBVarRiga AND
Articoli.KwNeutro = MFDBCompon_SottoP_Tallonet.DBNeutro LEFT OUTER JOIN
MFDBCompon_Acc2 INNER JOIN
Articoli AS Articoli_4 ON MFDBCompon_Acc2.CompNeutro = Articoli_4.Articolo INNER JOIN
MFKwVariantiRiga AS MFKwVariantiRiga_3 ON MFDBCompon_Acc2.CompVarRiga = MFKwVariantiRiga_3.Variante ON
KwVarArticolo.Variante = MFDBCompon_Acc2.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Acc2.DBNeutro LEFT OUTER JOIN
MFDBCompon_Acc1 INNER JOIN
Articoli AS Articoli_3 ON MFDBCompon_Acc1.CompNeutro = Articoli_3.Articolo INNER JOIN
MFKwVariantiRiga AS MFKwVariantiRiga_2 ON MFDBCompon_Acc1.CompVarRiga = MFKwVariantiRiga_2.Variante ON
KwVarArticolo.Variante = MFDBCompon_Acc1.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Acc1.DBNeutro LEFT OUTER JOIN
MFDBCompon_Tomaia3 INNER JOIN
Articoli AS Articoli_2 ON MFDBCompon_Tomaia3.CompNeutro = Articoli_2.Articolo INNER JOIN
MFKwVariantiRiga AS MFKwVariantiRiga_1 ON MFDBCompon_Tomaia3.CompVarRiga = MFKwVariantiRiga_1.Variante ON
KwVarArticolo.Variante = MFDBCompon_Tomaia3.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Tomaia3.DBNeutro LEFT OUTER JOIN
CatProvv ON Articoli.CatProvv = CatProvv.Categoria LEFT OUTER JOIN
Articoli AS Articoli_1 INNER JOIN
MFDBCompon_Tomaia2 ON Articoli_1.Articolo = MFDBCompon_Tomaia2.CompNeutro INNER JOIN
MFKwVariantiRiga ON MFDBCompon_Tomaia2.CompVarRiga = MFKwVariantiRiga.Variante ON
KwVarArticolo.Variante = MFDBCompon_Tomaia2.DBVarRiga AND Articoli.KwNeutro = MFDBCompon_Tomaia2.DBNeutro
WHERE (Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND
(Articoli.CatProvv IN (@CatProvv)) AND (Articoli.Disattivo = '0') AND (KwVarArticolo.Disattivo = '0') AND (ArtMerce.Fornitore IN (@Fornitore)) OR
(Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND
(Articoli.CatProvv IN (@CatProvv)) AND (Articoli.Disattivo = '0') AND (KwVarArticolo.Disattivo = '0') AND ('ALL' IN (@Fornitore)) OR
(Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND (Articoli.Disattivo = '0')
AND (KwVarArticolo.Disattivo = '0') AND (ArtMerce.Fornitore IN (@Fornitore)) AND ('ALL' IN (@CatProvv)) OR
(Articoli.KwCollezione = @KwCollezione) AND (Articoli.KwLinea = @KwLinea) AND (KwVarArticolo.TipoVariante = 52559872) AND (Articoli.Disattivo = '0')
AND (KwVarArticolo.Disattivo = '0') AND ('ALL' IN (@CatProvv)) AND ('ALL' IN (@Fornitore))
ORDER BY Articoli.CatProvv, Articoli.CatOmo, Articoli.Articolo, KwVarArticolo.Posizione


Thank you!
Roberto

View 3 Replies View Related

Class Method Is Smoking Fast When Executed Outside Of SQLServer, Dog Slow As A CLR Function Is SQLServer - Anyone?

May 10, 2007

We have a static class that makes an HTTPWebRequest to get XML data from one of our vendors. We use this as input to a stored proc in SQLServer2005. When I compile this class and call it from a console application in visual studio it executes in milliseconds, everytime. When I compile it, create the assembly and clr function and execute it in SQLServer, it takes around 14 seconds to execute the first time, then on subsequent requests it is again really fast, until I wait for 10 seconds and re-execute, once again it is slow the first time and then fast on subsequent requests. We do not see this behavior when executing outside SQLServer. Makes me think that some sort of authentication is perhaps taking place the first time the function is run in SQLServer? I have no idea how to debug this further. Anyone seen this before or have any ideas?



Here is the class:






Code Snippet

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;

namespace Predict.Services
{
public static class Foo
{
public static string GetIntradayQuote(string symbol)
{
string returnQuote = "";

HttpWebRequest request = (HttpWebRequest)(WebRequest.Create("http://data.predict.com/predictws/detailed_quote.html?syms=" + symbol + "&fields=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,30"));

request.Timeout = 1000;

HttpWebResponse response = (HttpWebResponse)(request.GetResponse());

StreamReader streamReader = new StreamReader(response.GetResponseStream());

returnQuote = streamReader.ReadToEnd();

streamReader.Close();
response.Close();

return returnQuote;
}
}
}



When I run call it from a console app it is fine.



I compile it into a dll and then create the assembly and function as follows:






Code Snippet

drop function fnTestGetIntradayQuoteXML_SJS

go

drop assembly TestGetIntradayQuoteXML_SJS

go

create ASSEMBLY TestGetIntradayQuoteXML_SJS from 'c:DataBackupsCLRLibrariesTestGetIntradayQuote_SJS.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS

go

CREATE FUNCTION fnTestGetIntradayQuoteXML_SJS(@SymbolList nvarchar(max)) RETURNS nvarchar(max) AS EXTERNAL NAME TestGetIntradayQuoteXML_SJS.[Predict.Services.Foo].GetIntraDayQuote

go



declare @testing nvarchar(max)

set @testing = dbo.fnTestGetIntradayQuoteXML_SJS('goog')

print @testing





When I execute the function as above, again, really slow the first time, then fast on subsequent calls. Could there be something wrong with the code, or some headers that need to be set differently to operate from the CLR in SQLServer?



Regards,



Skipper.

View 1 Replies View Related

A Procedure Runs Slow As A Job But Runs Fast Executed In A Query Window

Apr 23, 2008

Performance issue.


I have a very complex Stored Procedure called by a Job that is Scheduled to run every night.
It's execution takes sometimes 1 or 2 hours and sometimes 7 hours or more.

So, if it is running for more than 4 hours I stop the Job and I run the procedure from a Query Window and it never takes more than 2 hours.

Can anyone help me identify the problem ? I want to run from the Job and not to worry about it.

Some more information:
- It is SQL 2000 Enterprise with SP4 in a Cluster (It happens the same way in any node).
- The SQL Server and SQL Agent services run using a Domain Account that have full Administrative access.
- When I connect to a Query Window I also use a Windows Account.

- There is no locks or process bloking or being blocked while the job is running.
- Using the Task Manager the processor activity is ok, no more than 30 % in any processor.

View 15 Replies View Related

A Query Runs Fast In Query Analuser But Slow In APplication

Jul 23, 2005

I am able to run a query which runs FAst in QA but slow in theapplication.It takes about 16 m in QA but 1000 ms on theApplication.What I wanted to know is why would the query take a longtime in the application when it runs fast on SQL server?How should we try debugging it?Ajay

View 2 Replies View Related

Sql Authentication = Fast./ Windows Authentication = V.slow!

Mar 25, 2004

Hello,

(Using win2k, sqlserver2k, framework 1.1)
I have an fairly data-heavy application that uses Windows authentication (Trusted connection/aspnet account) to connect to Sql Server. The site uses IIS basic authentication.

On the dev server everything works fine but when I move to the live server things get strange and it starts to crawl along. (Pages load OK but then it just crawls as it loads the datagrids etc. Sometimes it brings back incomplete/incorrect data )

BUT When I use Sql Authentication to connect to Sql Server and there is no problem at all!

Ok, there is something obviously wrong with the live server (which is identical setup to dev)but I dont know where to start.

Any ideas??

View 2 Replies View Related

SQL Connections Don't Go Away Fast Enough On Production Server, Dev Is Fine.

Jan 5, 2006

On my development machine (XP Pro), when I run several reports in a loop, my connection count (in performance monitor) climb up to around 25 then immediately drop back to 1 when the reports are done being generated.
On our production server (WinServer 2003, IIS6) the SQL connection count climbs up to around the same number, then holds there for a few minutes.  I know I am closing the connections properly in my code because they clean up fine on the development machine.
I'm sure this is a timeout setting or an IIS 6 option I need to tweak.  How can I make my production machine remove those connections faster?
 

View 1 Replies View Related

Go To Page X Of Y Fast - Not Supported In Sql Server 2008?

Jun 21, 2007

I've been using full-text for quite some time, but I switched to another product for quite some time. The reason is that microsoft full-text doesn't offer the feature where one can get a resultset of page x out of y pages, i.e: give me top 100 matches of page 125 out of 5000 pages. I disappointedly waited for SQL Server 2005 and now it doesn't seem to support in sql server 2008 full-text search either. I had to get all 5000 pages of data, then jumped to page 125 to get just 100 records of that page--had to go get a coffee and came back for a 2+ millions rows table. Customers want the result in a split of a second.



Anyone knows if the final version of sql server 2008 will have better support for paging and getting top x rows? I scanned through 2008 BOL and didn't see any change from sql server 2005 or even sql server 2000 full-text search. (one improvement in sql server 2005 over sql server 2000 was the speed of populating large catalog and multiple languages support)



Thanks,



HH

View 1 Replies View Related

How To Enable Fast Graph Operation In Sql Server?

Mar 1, 2007

Storing large graph in
relational form doesn't allow us to perform graph operations such as
shortest path quite efficiently. I'm wondering if storing the graph as
objects would be better? How should I design the schema? Thanks!

View 3 Replies View Related

Fast Help Needed On Simple Linked SQL Server Select

Jan 11, 2002

I have 2 SQL 2000 servers. One has been added as a linked server.
They both have a db called claims. If I am on server 1 and want to write a sql statement I am stuck with the write syntax

I tried select patient.* from testedi..claims.

The server is linked using the sa user. I know this is simple but in a hurry and stuck. THe servers are on same domain.
Thanks

View 1 Replies View Related

Fast Date Ranges Without Loops In SQL Server 2000

Sep 28, 2005

The trick is to use a pivot tableCheck out the code herehttp://sqlservercode.blogspot.com/2...ops-in-sql.html

View 3 Replies View Related

Same Query - Fast On DatabaseA But Timesout On DatabaseB (same Server)

Sep 21, 2007



I have this 3rd party query:


SELECT D_P.PostId, D_P.TopicId, D_P.PostingUserId, D_P.BasePostId, D_P.ParentPostId, D_P.PostLevel, D_P.SortOrder, D_P.PostTitle,

D_P.PostDate, D_P.IsAnon, D_P.FileId, D_P.Property, D_P.IsDeleted, D_P.IsHTML, D_P.LastEdittedByUserId, D_P.LastEditDate,

CAST( ISNULL(D_P.FileId,0) AS BIT ) AS HasFile, F.FileName, CAST( ISNULL( U_RP.IsRead, 0 ) AS BIT) AS IsRead,

CAST( ISNULL( U_RP.IsFlagged, 0 ) AS BIT) AS IsFlagged, CASE WHEN IsAnon = 1 THEN CAST('Anonymous'AS VARCHAR(128))

ELSE U.FirstName+' '+U.LastName END AS Poster

FROM DISCUSSION_POSTS D_P

INNER JOIN USERS U ON D_P.PostingUserId = U.UserId

LEFT JOIN FILES F ON D_P.FileId=F.FileId

LEFT JOIN DISCUSSION_READPOSTS U_RP ON U_RP.UserId = 4265 AND D_P.TopicId = U_RP.TopicId

AND D_P.PostId = U_RP.PostId

WHERE D_P.TopicId = 460106

AND BasePostId IS NOT NULL

AND ((PostTitle LIKE '%flood%') OR (PostText LIKE '%flood%'))

AND ((PostTitle LIKE '%flood%') OR (PostText LIKE '%flood%')) -- No idea why they are doing this twice

ORDER BY PostDate DESC, D_P.PostId DESC


On the same server DatabaseA the query runs in less than 5 seconds. On DatabaseB the query times out. I can not see the execution plan for the query that times out. I am executing the query using SQL Server MGMT Studio. I have rebuilt all of the indexes, stats updated usage. Still no luck. I have checked all of the database setting and they are the same. If I comment out theste 2 lines "AND ((PostTitle LIKE '%flood%') OR (PostText LIKE '%flood%')) " the query run like it should and uses an execution plan all most the same as when using DatabaseA. Any pointers in the the right direction would be greatly apprecited!!!

Oh ya SQL Server EE 2005 sp 2 cu 3

Thanks,
~Joseph~

View 2 Replies View Related

Desktop Server

Feb 24, 2007

1. Today I've installed webmatrix and MSDE200A and followed this instruction"Select 'SQL2kdesksp3.exe' and save it to your computer.Double-click on the SQL2kdesksp3.exe you downloaded.Once you have run the self extracting exe (SQL2kdesksp3.exe), go to a command prompt.Start > Run > cmdNavigate to the directory you expanded the self extracting exe to and change to the MSDE subdirectory.The default is C:sql2ksp3Type Setup SAPWD=(Some password) SecurityMode=SQLExample:c:sql2ksp3> Setup SAPWD=password SecurityMode=SQLAfter that gets done running, MSDE is installed.Start servicesTo get the SQL Server running and the SQL Agent we need start the services.right click My Computer > manage > servicesDouble click the following and set to Automatic.MSSQLSERVERSQLSERVERAGENTMake sure both are on automatic." then I restarted my comp. I've tried to connect to database but it did not work.I need the reply ASAP!!!!   2.What are the different among  MSDE200A.exe, sql2ksp3.exe, and sql2kdesksp3.exe ?

View 1 Replies View Related

Desktop SQL Server 7

Dec 7, 1999

Is it necessary to have a MS Loopback Adaptor to install SQL Server desptop edition at my home ? ( Otherwise i am unable to connect to the server from the EM )
Thanks,
Deepak.

View 1 Replies View Related

SQL Server Admin 2014 :: High Memory Is 70% And Growing Fast

Mar 5, 2014

My database server memory utilisation is growing faster from past 1 week. it remained same for 1 week around 55% and now it is going to 70% and increasing.

Total OS memory is 32GB and I kept cap for sql server memory upto 29GB. Dont know what to do..

View 9 Replies View Related

Sql Server Desktop Edition

Dec 19, 2003

hi, can I use sql server desktop edition to deploy my web application and at the same time I am not violating license agreement with Ms.

thanks
Al

View 1 Replies View Related

Sql Server Desktop Edition

Feb 2, 2005

my application has a good amount of data that is specific to each company (where there is only one user). i am currently setting it up as a access project, but was wondering about another route. to store the local data would there be an advantage to setting it up as a access project, and use the sql server desktop engine for the data, or should i stick with mdb tables?

View 2 Replies View Related

SQL Server Desktop Version?

Jul 16, 2006

Does a desktop version SQL Server exist with Enterprise Manager and Query Analyzer? I'm a developer who uses SQL Server, Enterprise Manager and Query Analyzer at work to write scripts and batches. I would like to enhance my SQL Server skills at home on my desktop computer.

View 5 Replies View Related

SQL Server 2012 :: Fast Data Loading With Partition Switching Strategy

Jul 28, 2015

I’m looking for clearity on partition switching. The idea is to use many BULK INSERT statements into table dbo.X_n in parallel and when BULK INSERT for table dbo.X_n is completed, switch dbo.X_n into dbo.bigdaddy. I think this is the fastest way to upload a couple hundred GB of data.

In learning about partition switching (in part) from The Data Loading Performance Guide under Partition SWITCH, I hear the instructions to say copy the main table exactly to become a target. But in that same step (#1), I read that we need to change the default file group of the target (dbo.X_n) from the default file group. Then it says I need to match indexes and lists the filegroup as something we need to match with the main table.

As an overview of the partition switching strategy, I think the whole point of BULK INSERT with partitioning is to have seperate files (in same group) to enable concurrent uploading where each table has its own file. Once the upload is completed to a table (dbo.X_n) then we do the partition switch into the main table (dbo.bigdaddy). The data we just uploaded doesn’t actually move, just the metadata for it.

“Don’t have the same filegroup on your target as the main table. You must have the same filegroup on your target as the main table.”

View 1 Replies View Related

MSDTC - Remote Accessing SQL Server 2005 From A Desktop Application - Windows 2003 Server

Dec 6, 2007

Hi,

I am developing a windows application that needs to communicate with a remote SQL server 2005 database. Server allows remote connections and MSDTC service also running. Do I need to run MSDTC service on the client machine where I use desktop application ? any ideas ? It's throwing some error like
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact
that under the default settings SQL Server does not allow remote connections.

But my SQL Server allows remote connection, and I am able to do a select statement.
But when I insert/update anything, it's throwing this error. I guess some problem with MSDCT. Anybody have any idea ?

View 1 Replies View Related

Unable To Connect To SSIS Or SSRS On SQL Server 2005 Standard Edition Server Via Desktop Connection

Mar 8, 2008

Hi,

Ive developed a BI system using the SQL Server 2005 Developers Edition.

SSAS, SSIS and SSRS have been added to a SQL Server 2005 Standard Edition Server in preparation for delivering the developed database to this live environment.

So I am able to connect directly to the Database Engine, SSAS, SSIS and SSRS successfully from the actual SQL Server 2005 Standard Edition box which is sat on a Windows 2003 Server operating system.


However when I launch SQL Server Management Studio from a desk top PC which is connected to the SQL Server Standard Edition box I cant connect to either SSIS or SSRS, however I can connect to the Database Engine and it also seems that I can connect to SSAS OK.

I am using Windows Authentication where the I used a SQL Server account which exists with sysadmin? permissions and this SQL Server account has the same login name as the Windows Server 2003 desktop login.

What do I do next please?

View 4 Replies View Related

Problem With Installing Sql Server Desktop

Jun 25, 2004

I have a new computer p4 2.8
i just install in it the Microsoft Visual Studio .NET, when i try to install the sql server desktop from:
"C:Program FilesMicrosoft Visual Studio .NETSetupMSDE" in the middle it stops installing,
I tryed to uninstall Visual Studio and install it again , but i get the same problem
what can i do?

View 1 Replies View Related

Verifying Ms Sql Server Desktop Installation

Feb 20, 2005

I am trying to use msde for the startup kits. but i cannot connect to it. How can I do a simple test to verify it is installed and that I can log into the db?

Thanks
Ron

View 1 Replies View Related

Problems Sql Server 2000 Desktop

Oct 12, 2005

hI I M VERY MUCH NEWTO ASP.NET +SQL SERVER U CAN SAY I JUST INSTALL
BOTH WHEN I I FIRST INSTALL QUICKSTART TUTORIAL OF MS.NET2003 IT ASK ME
TO COPY MY DATABASE file to sqlserverosql -E -S (local)NetSDK -i InstPubs.sqlosql -E -S (local)NetSDK -i InstNwnd.sqlosql -E -S (local)NetSDK -i Portal.sqlosql -E -S (local)NetSDK -i Grocer.sqlwhen i tries to do that it give me the following errors
[DBMSLPCN]SQL Server does not exist or access denied.[DBMSLPCN]ConnectionOpen (Connect()).
well my sql server name is www
same as my computer name (www)services is sql servermy computer is running xp sp2and i m running .net1.1also please tell me how to Granting Access to the ASPNET usermy asp.net user name is ASP.NETif i have to reinstall sql server 2000 tell me what step i should follow to configure it correctlyi m waiting for ur QURU's answers hopefully soonhave a nice dayHUssain

View 5 Replies View Related

What&#39;s Difference Between Desktop And Server Version

Oct 19, 1999

As we known, we can build up the data in not only in Server version but also in Sesktop version. So, what's the difference? Except the power that Server can provide compared to the desktop computer. Whatelse?

Thanks! Guru!

View 1 Replies View Related

Service Won&#39;t Start On SQL Server 7.0 Desktop

Apr 7, 1999

I recently installed SQL Server 7.0 on my desktop workstation. I has been working great until yesterday when services wouldn't start. The Service Manager gave me a message "An error 1069 - (The service did not start due to a logon failure.) occurred while performing this service operation on the MSSQLServer service." It appears to be a permission problem, but my profile hasn't changed, I have admin rights on my workstation. Can anybody help?

View 1 Replies View Related

Service Won&#39;t Start On SQL Server 7.0 Desktop

Apr 7, 1999

I recently installed SQL Server 7.0 on my desktop workstation. I has been working great until yesterday when services wouldn't start. The Service Manager gave me a message "An error 1069 - (The service did not start due to a logon failure.) occurred while performing this service operation on the MSSQLServer service." It appears to be a permission problem, but my profile hasn't changed, I have admin rights on my workstation. Can anybody help?

View 1 Replies View Related







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