Re: Slow SQL-server
- From: "Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx>
- Date: Tue, 15 Jul 2008 09:39:05 -0400
As Ekrem stated you need to find the actual bottleneck before you can start addressing the issues otherwise you could be putting effort into the wrong places. Have you looked at the wait stats to see what you are waiting on most? As for your indexes I can't believe that the only argument in the where clause is "Active = 1". I can see why that is there but you must be searching on some other criteria other than the row is deleted or not. In any case an index on a bit column will rarely be useful since there selectivity is usually low. In this case most rows should be active so the index will be useless by itself.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"KS soerensen@xxxxx>" <keld.<SLET_DETTE> wrote in message news:6F9001F6-BDC4-46BB-9CE1-F6D34C3738E8@xxxxxxxxxxxxxxxx
"Tibor Karaszi" <tibor_please.no.email_karaszi@xxxxxxxxxxxxxxxxxx> skrev i meddelelsen news:7A77127D-7AB6-471B-BA2F-AA5049134E78@xxxxxxxxxxxxxxxxWhat settings? There are a huge amount of settings, ranging from the instance level, through the database, table and index level (etc). You can read up on things like sp_configure, sys.databases, sp_indexoption, sp_tableoption, sp_procoption etc. But it is easier to tell you anything concrete if we know what settings you are looking for.Some settings witch - by changing them - maybe can give me a better performance !
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
I have tried to index the fields I use in my "WHERE xxxx" (xxxx - field is now indexed) no impact on the performance at all !
Often it's only one field in the "WHERE" - a boolean - to show if the record is active or not !
My former college implemented this very simple (=stupid) way to "delete" records and I'm now working on getting all in-active records in fact deleted and then delete the "WHERE active=1" in nearly all my stored procedures - will this give some more performance ?
I have about 40 tables with from 5 to 4000 records each - and one of them up to 20.000 records.
The structure is well normalized and some relations has "cashade deleting" set.
8-10 users - it should be a "peace of cake" for the SQL-server I think - but it's so slooooooow !
Any ideas what to do ?
Best regards
KSor
.
- References:
- Slow SQL-server
- From: KSor
- Re: Slow SQL-server
- From: Tibor Karaszi
- Re: Slow SQL-server
- From: KS
- Slow SQL-server
- Prev by Date: Re: Slow SQL-server
- Next by Date: Re: client question
- Previous by thread: Re: Slow SQL-server
- Next by thread: client question
- Index(es):
Loading