SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Urgent help required !!!!!


Urgent help required !!!!!

Author
Message
samsql
samsql
SSC-Addicted
SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)

Group: General Forum Members
Points: 457 Visits: 558
we hav a server in which there is only 1 database from the front end users are getting problem while ftching records ...i hav checked indexes thy are proper ...query is really simple 2 days back it was taking on 2 sec for the out put now it is taking 40 to 60 secs and it is really slow ...
Plz help i m a dba wat shud i check now counter or memory..... plz let me fast ...

Thkz in adv
steveb.
steveb.
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4424 Visits: 7195
Run a server side trace , have a look at what excatly is casuing the problems and start from there.
samsql
samsql
SSC-Addicted
SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)

Group: General Forum Members
Points: 457 Visits: 558
this is the query taking time 1st it was taking only 2sec now it takes 40 to 60 secs .... databse size 18 GB ,ram 3 GB
sqlserver taking more then 2 Gb of ram

select alias.id,alias.aaa,alias.colname,table1.id,
table1.ttt,table1.c_f_name,cy.cmd from table3 alias,
cm table1,table2 cy where alias.colname=table1.colname
and cy.colname = table1.colname and table1.id='354'and
alias.colname in (select colname from table2 where colname
like '365464') and colname='A' and colname =123)
WiltsDBA
WiltsDBA
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 184
Sorry marfu, but without seeing the structure of your tables, indexes etc it is difficult to see why this could be happening.

How big is the actual table? If you look at the execution plan, you could see which indexes it is using and try to rebuild those first...Providing no-one has deleted an index, then it should just be a case of rebuilding the stats (a reindex will do that for you, so there is no need to run a stats rebuild if you are reindexing) or re-creating the index if it has been deleted - you could try running the query through the engine tuning wizard and build any stats/indexes it recommends.

I wouldn't normally recommend that, but as I can't physically get my hands on the server, its tricky BigGrin

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein
GilaMonster
GilaMonster
SSC Guru
SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)SSC Guru (88K reputation)

Group: General Forum Members
Points: 88066 Visits: 45277
Has anyone dropped or changed an index?
Are any of the indexes fragmented?
Are the statistics up to date?
What does the execution plan of that query show?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


gerry.geisel
gerry.geisel
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 111
What's the front end? Does the front end fetch entire tables before completing the qurery or send a few bytes to the back end for processing?

What other network traffic is running?

Dump temp cache in clients and reboot.
samsql
samsql
SSC-Addicted
SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)SSC-Addicted (457 reputation)

Group: General Forum Members
Points: 457 Visits: 558
There is no issue wth indexes but i reboot my database server and it was workin fine ... application is on different server ... users fetch and insert data thro frnt end ....
this is wat i got abut fregmentation...there is no issue wth it..


DBCC SHOWCONTIG scanning tablename' table...
Table: tablename (1093578934); index ID: 1, database ID: 7
TABLE level scan performed.
- Pages Scanned................................: 245034
- Extents Scanned..............................: 30783
- Extent Switches..............................: 31406
- Avg. Pages per Extent........................: 8.0
- Scan Density [Best Count:Actual Count].......: 97.53% [30630:31407]
- Logical Scan Fragmentation ..................: 0.16%
- Extent Scan Fragmentation ...................: 0.29%
- Avg. Bytes Free per Page.....................: 1499.8
- Avg. Page Density (full).....................: 81.47%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
WiltsDBA
WiltsDBA
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 184
Marfu,
Thats great.
Have you looked at the execution plan to see what indexes the query is using? If it is doing a table scan, then maybe you need to see if someone has dropped an index (I believe Gail said about that earlier).
Have you run the query through the engine tuning wizard - JUST to make sure nothing has been accidentally dropped...

"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein
i6004835
i6004835
Valued Member
Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)Valued Member (55 reputation)

Group: General Forum Members
Points: 55 Visits: 382
Well, I agree with the others to first look at your index. If the index is still there then start with performance monitor to look at the processor counter, batch requests/sec, etc. It may also because the heavier traffic during that day. Another cause is the table may grow larger than before. Or the cache is emptied that makes compiling also possible. Check with the execution plan as well.

Ivan Budiono
ChiragNS
ChiragNS
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3431 Visits: 1865
maruf24 (7/30/2008)

select alias.id,alias.aaa,alias.colname,table1.id,
table1.ttt,table1.c_f_name,cy.cmd from table3 alias,
cm table1,table2 cy where alias.colname=table1.colname
and cy.colname = table1.colname and table1.id='354'and
alias.colname in (select colname from table2 where colname
like '365464') and colname='A' and colname =123)


i may be wrong ... but still 2 cents
cant u take away the "in" part and replace it with
colname = '365464'. Another thing using like is also going to return one record.

"Keep Trying"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search