-
SQL timeout issue
I'm using SQL express and during my application startup, i do a basic query to the database.
(e.g select column1 from table1)
This table only has 30 records but the rest of the tables has many. Because my app runs the query to this table first, i get the error. My database size is 2.0 GB (i know it's huge)
My timeout limit i set is 60 seconds. IS there any other solution for this rather than increasing the timeout value?
This timeout issue only happens on and off... but not always. I'm using C# with .Net 2.0.
Thanks
-
Re: SQL timeout issue
How much data does this query return? thousands of rows?
Do you have right indexes on right columns if you use a where cluase?
can you consider paging data?
the more details you post the more hlp you can get:)
-
Re: SQL timeout issue
the table I'm quering only has 23 rows.
-
Re: SQL timeout issue
can you post your connection string ?
I suspect that you attach the DB on connection...
Also external factors can affect the query. is the machine with SQL serve under big load?
you can check performance monitor to get some useful info.
-
Re: SQL timeout issue
Given the use of SQL Express, I am betting that this occurs when the SQLEngine has "idled down", and the long time is for a SQL restart. This can be confirmed [or eliminated] by PerfMon and the event log.
-
Re: SQL timeout issue
hspc,
This would be my connection string :
"Data Source=ABC;Initial Catalog=aaa;User Id=sa;Password=abc"
-
Re: SQL timeout issue
newvista..
Connection string seems ok to me .. you should check the performance monitor and logs.