I have a job board website being hosted somewhere in the US. In certain sections of the website, whne the search criteria for a cnadidate becomes too long the server times out. So i decided to host the website on the intranet. I have a server with MS Server 2003 and MSSQl 2008 installed on it. I downloaded the database files ie MDF and log file and attached it to the server. I setup the website to run locally and everything was fine till i logged in.
Now, everytime i search for something in the website the server timesout.
Beofore when the website was hosted in the US it used to timeout ocassionally.
So i started running queries and checking why the server was timing out.
I found this:
certain columns in the tables are 'computed' type. So some columns get the data from other columns.
Eg: 'age' column computes the data from the date_of_birth column etc ect... there are around 5 such columns which some times compute data from other table columsn aswell.
What i dot understand is , why is the databsae responding like this??
When ever i run a query with any of these 'computed columsn' , even to return like 100 rows the query takes around 90 secs
but when the query doesnt involve any of these 'computed columns' its done in 2 secs.
I dont understand why it worked ok when it was hosted ?? and doesnt work ok now.
Is it because i havent configured the MSSQl server right.
IS there anyway from preventing it from taking so long.??