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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-06-14 : 10:07:48
|
Stéphane Cormier writes "Hi,
I've got SQL Server on a server...really fast and okay but when I try to make big requests via ASP pages , it seems that SQL server takes forever to "build" the recordset, and I have the following error :
Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
[Microsoft][ODBC SQL Server Driver]Timeout expired
/BGA/RegPDL/Rapports/excel/tache/new_rapport.asp, line 425
I know that my query interacts with a >100'000 records table with a 50000 records table, joined with other, smaller tables...
here is my query :
SELECT tblDEMANDE.no_demande, tblDEMANDE.Site, tbl4SuiviStructure.GraphAss, tblDEMANDE.nociviq, tblDEMANDE.rue, Centraux_Secteur.NOM_DU_CENTRAL, tblTerritoire.Nom, tblDEMANDE.IDSTATUT, tblDEMANDE.priorite, tblActiviteReg.Description, tblTachesDemande.IDSTATUT as [Statut_Tache],PR_CCD.surname+','+PR_CCD.firstnm as [NomResponsable], tblTachesDemande.Recu, tblTachesDemande.DebutPrevuLe, tblTachesDemande.Requis, tblTachesDemande.Complete, tblTachesDemande.HreEstimee, tblTachesDemande.HreDeboursee, tblDEMANDE.EmettreLe, tblDEMANDE.DDI, tblDEMANDE.NoOTP, tblDEMANDE.NoRDT, tblDEMANDE.NoPermisCablo, tblDEMANDE.Remarques FROM ((((((tblDEMANDE LEFT JOIN tbl4SuiviStructure ON (tblDEMANDE.Site = tbl4SuiviStructure.Site) AND (tblDEMANDE.no_demande = tbl4SuiviStructure.NoDemande)) LEFT JOIN tblTachesDemande ON (tblDEMANDE.Site = tblTachesDemande.Site) AND (tblDEMANDE.no_demande = tblTachesDemande.no_demande)) LEFT JOIN tblTerritoire ON tblDEMANDE.RefTerritoire = tblTerritoire.NoTerritoire) LEFT JOIN Centraux_Secteur ON tblDEMANDE.SUCAL = Centraux_Secteur.SUCAL) LEFT JOIN PR_CCD ON tblTachesDemande.NIP = PR_CCD.pein) LEFT JOIN tblSTATUTDetaille ON tblTachesDemande.IDSTATUT = tblSTATUTDetaille.IDSTATUT) LEFT JOIN tblActiviteReg ON tblTachesDemande.IDACTIVITE = tblActiviteReg.NoRef WHERE tblDEMANDE.Site='CHOMPQCC' AND (tblActiviteReg.Description NOT LIKE '4112%' OR tblTachesDemande.IDACTIVITE =-1) AND (tblActiviteReg.Description <> 'BACK LOG IMAP' OR tblTachesDemande.IDACTIVITE =-1) AND tblTachesDemande.IDSTATUT='CTIDA'
Is There a way to optimize that query so SQL server doesn't generate a time-out? Or, is there a performance setting that I could use in SQL enterprise Manager?
Thanks in advance.
Stéphane" |
|
|
|
|
|
|
|