Question:
Sql database slow?
Weilian Ting
2007-04-24 20:32:25 UTC
our accounting system using sql database, n currently database size reach 20G above... server spec is xeon 3GHz, 4G ram, 250 raid-1 HDD... now our sql run very slow n maybe 3 time slower, anybody know where i need to check?? we r using sql server 2000 enterprise n windows server 2003 standard.
Four answers:
Martyr2
2007-04-24 23:19:50 UTC
Slow database queries can be caused by many things...



1) Your data may be poorly designed and not efficiently linked together according to normalization rules.



2) Your queries themselves could be written in such a way that it forces SQL server to do a bunch of calculations that are not needed. You can verify this one by running SQL profiler and watch statements under the TSQL section titled "batchcompleted" then look at the reads/writes for each statement.



3) You could have bad indexes on your tables or your indexes need optimizing. The best way to keep your indexes in tip-top shape is by setting up a maintenance plan through enterprise manager.



The general rule for speed is also to make sure that your RAM is large enough to adequately fit the entire contents of the database within it. For example, if your database is 20 gigs you should have as close to 20 gigs of RAM... that way all data is held in memory for the fastest possible access.



You could also try breaking that 20 gigs across multiple databases. Perhaps you don't need it all in a single database, create one for logs and stats, maybe archive some of the older not readily used information, or some of the fields could be calculated on the fly perhaps?



I have put a great site for helping with SQL server problems, with some solutions I have mentioned here.



Good luck and hope it works out for you.
foylesjr
2016-11-27 07:47:47 UTC
by way of fact the database grows in length, it is going to hold out slower than it would desire to have if it replaced into designed extra suitable. additionally, the builders would have a extra durable time working with the information, that will improve production time and make errors extra obtainable.
2014-07-23 02:59:09 UTC
hard point query into yahoo or google it could help
2007-04-24 20:48:11 UTC
Yes, you need to check the local job boards for a DBA.



Your question is meaningless. You say your DB is now slower.



Slower than WHAT? Slower than mine? Slower than it was WHEN?



Gah.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...