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 |
|
peiklk
Starting Member
4 Posts |
Posted - 2008-03-31 : 14:16:44
|
| I run a website, so all of this is done remotely, I do not have access to the servers directly. On my prior host, everything on the DB worked just fine. Had it optimized and running pretty good for the site by adding indexes, etc.Then I moved to my new faster server (new host) and at first everything seemed to be just fine. However, some users started complaining about speed in spots.Sure enough when I checked a given page -- WHAM... the page took about 14 seconds to load. Not exactly fast. :)So I checked to make sure the indexes copied over and sure enough they did. But it was still slow, even in Query Analyzer/MSE.So I decided to rerun my view script... on a lark... just to see if that affected something. And sure enough it did. The page started running at 1 second or less. OK, I thought, the view just got corrupted or something.All was fine until the next night when it happened again. I had added 12 new rows to the table (I do this nightly) and it seemed that adding the new rows slowed down the system. Until the view was rebuilt. With that done again, it's worked fine.But each night now I have to rerun that view.What gives??? Is there a DB setting or something causing views/indexes to not be maintained? The prior server was 2000 or 2003. The new one is 2005.Again, I cannot get access to the box itself except through Management Studio. The host's tech support group is less than useless, treating everyone as incompetent before they help you.Any hints or solutions would be a big help! |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-03-31 : 22:19:14
|
| How often do you rebuils index or update statistics? |
 |
|
|
peiklk
Starting Member
4 Posts |
Posted - 2008-04-01 : 09:11:47
|
| :)Well, I guess I figured SQL Server did that stuff automatically. :)I just did UPDATE STATISTICS on all the views and tables and after last night's insert it did not slow down.Is there a way to make that process automated? |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-01 : 23:26:11
|
| Yes, you can set maintenance plan for that and run it as sql job. |
 |
|
|
peiklk
Starting Member
4 Posts |
Posted - 2008-04-03 : 09:10:53
|
quote: Originally posted by rmiao Yes, you can set maintenance plan for that and run it as sql job.
How do I do that remotely? The only help I could find said I needed server access. |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-04-03 : 09:25:39
|
| Look up sp_add_job in Books Online. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-03 : 23:03:57
|
| How did you update stats on the server? If you can run query on server, then why can't connect to it in ssms? |
 |
|
|
peiklk
Starting Member
4 Posts |
Posted - 2008-04-04 : 14:44:28
|
| I can run Query Analyzer / Sql commands. But when I right click on the DB, I don't get the task option. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-04-05 : 23:00:48
|
| You mean schedule sql job? It's under management -> sql agent, not in each db. |
 |
|
|
|
|
|
|
|