Pls guide me in solving the below issue..
Our site sometimes is working too slow and sometimes it works fine,Its is java with sqlserver as backend.
Its in OLTP for banking ..web enabled.
Server Config is as under
Db Server. + Appl Server (Javaw)
--
Db Size is : 6 gb
Server : Compaq Proliant ML350 G2
CPU : Intel PIII 1.133 GHz * 2
Ram : 2 GB (512*4)
3 * 36.4 GB 10K U3 HP
1.174 TB (6 x 146.8 GB 1² with standard internal hot plug drive cage + (2 x 146.8 GB 1² ) with optional ML3xx Internal Two Bay Hot Plug SCSI Drive Cage)
Log and Data files are on same hdd : Raid Level 5..
Web server : Same config with JRun and IIS.(also some schedules running on which hits db after every 10 mins in jave for email etc)
We are unable to trace the issues...site sometimes is dead..and sometimes works fine.
I check db proc's and indexes..it is not proper and sometimes one or two processes are getting blocked(but this happen in 3-4 days)...Usuage of tempdb is also high..but we had schedule our processes which truncates tempdb time to time..I had advised some indexes + optimzied most of the procedures..(this is in test server)
--
and after all we had installed OS + IIS of web server..WE HAD CHECKD ONE THING..WHEN SITE IS SLOW ITS WORKING WITH JRUN(DIFFT PORT) BUT WITH IIS ITS DEAD SLOW...
They are uusing xml with Jsp and java...
--
as Per perf counter of db server: Cpu usage is low,full scan / sec(sometimes its high around 6+),pages / sec =2 or 3/recompile / sec(always 0.00123...etc))
pls help me ..in solving the following issues.
1) We r not able to figure out whether db is slow or is there any db server issues...(optimzied queries and indexes are still on test server)
2) is there any web server issues..wot things we need to check with IIS/Jrun or java..
3) If there is any deadlock or blocking session on one procedure..will it hamper the performance of entire site or only web pages or processes related with the tables used in procedures becomes locked and slow...
4) Is it advisable to restart sql server..this thing clients DBA are doing more often whenver sites becomes slow...or may be webserver ..and after this they found site works fine.
Pls help me in finding solution or forward to concerned expertise persons.
WE ARE TRYING TO FIGURE OUT PROBLEM FROM LAST 10 DAYS BUT FAILED...sanjay
<http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q224453>--
-- INF: Understanding and Resolving SQL Server 7.0 or 2000 Blocking
Problems (Q224453)
"sanjay" <sanjay_agn@.rediffmail.com> wrote in message
news:FFA51457-AB7C-42AC-8022-7A27E3CA797C@.microsoft.com...
> Pls guide me in solving the below issue..
> Our site sometimes is working too slow and sometimes it works fine,Its is
java with sqlserver as backend.
> Its in OLTP for banking ..web enabled.
> Server Config is as under
> Db Server. + Appl Server (Javaw)
> --
> Db Size is : 6 gb
> Server : Compaq Proliant ML350 G2
> CPU : Intel PIII 1.133 GHz * 2
> Ram : 2 GB (512*4)
> 3 * 36.4 GB 10K U3 HP
> 1.174 TB (6 x 146.8 GB 1² with standard internal hot plug drive cage + (2
x 146.8 GB 1² ) with optional ML3xx Internal Two Bay Hot Plug SCSI Drive
Cage)
> Log and Data files are on same hdd : Raid Level 5..
> Web server : Same config with JRun and IIS.(also some schedules running on
which hits db after every 10 mins in jave for email etc)
> We are unable to trace the issues...site sometimes is dead..and sometimes
works fine.
> I check db proc's and indexes..it is not proper and sometimes one or two
processes are getting blocked(but this happen in 3-4 days)...Usuage of
tempdb is also high..but we had schedule our processes which truncates
tempdb time to time..I had advised some indexes + optimzied most of the
procedures..(this is in test server)
> --
> and after all we had installed OS + IIS of web server..WE HAD CHECKD ONE
THING..WHEN SITE IS SLOW ITS WORKING WITH JRUN(DIFFT PORT) BUT WITH IIS ITS
DEAD SLOW...
> They are uusing xml with Jsp and java...
> --
> as Per perf counter of db server: Cpu usage is low,full scan /
sec(sometimes its high around 6+),pages / sec =2 or 3/recompile / sec(always
0.00123...etc))
>
> pls help me ..in solving the following issues.
> 1) We r not able to figure out whether db is slow or is there any db
server issues...(optimzied queries and indexes are still on test server)
> 2) is there any web server issues..wot things we need to check with
IIS/Jrun or java..
> 3) If there is any deadlock or blocking session on one procedure..will it
hamper the performance of entire site or only web pages or processes related
with the tables used in procedures becomes locked and slow...
> 4) Is it advisable to restart sql server..this thing clients DBA are doing
more often whenver sites becomes slow...or may be webserver ..and after this
they found site works fine.
>
> Pls help me in finding solution or forward to concerned expertise persons.
> WE ARE TRYING TO FIGURE OUT PROBLEM FROM LAST 10 DAYS BUT FAILED...
>|||To determine if you have any deadlocks enable the following trace flags
DBCC TRACEON (1204,3605,-1)
This will output any deadlock info into the SQL ErrorLog
--
HTH
Ryan Waight, MCDBA, MCSE
"sanjay" <sanjay_agn@.rediffmail.com> wrote in message
news:FFA51457-AB7C-42AC-8022-7A27E3CA797C@.microsoft.com...
> Pls guide me in solving the below issue..
> Our site sometimes is working too slow and sometimes it works fine,Its is
java with sqlserver as backend.
> Its in OLTP for banking ..web enabled.
> Server Config is as under
> Db Server. + Appl Server (Javaw)
> --
> Db Size is : 6 gb
> Server : Compaq Proliant ML350 G2
> CPU : Intel PIII 1.133 GHz * 2
> Ram : 2 GB (512*4)
> 3 * 36.4 GB 10K U3 HP
> 1.174 TB (6 x 146.8 GB 1² with standard internal hot plug drive cage + (2
x 146.8 GB 1² ) with optional ML3xx Internal Two Bay Hot Plug SCSI Drive
Cage)
> Log and Data files are on same hdd : Raid Level 5..
> Web server : Same config with JRun and IIS.(also some schedules running on
which hits db after every 10 mins in jave for email etc)
> We are unable to trace the issues...site sometimes is dead..and sometimes
works fine.
> I check db proc's and indexes..it is not proper and sometimes one or two
processes are getting blocked(but this happen in 3-4 days)...Usuage of
tempdb is also high..but we had schedule our processes which truncates
tempdb time to time..I had advised some indexes + optimzied most of the
procedures..(this is in test server)
> --
> and after all we had installed OS + IIS of web server..WE HAD CHECKD ONE
THING..WHEN SITE IS SLOW ITS WORKING WITH JRUN(DIFFT PORT) BUT WITH IIS ITS
DEAD SLOW...
> They are uusing xml with Jsp and java...
> --
> as Per perf counter of db server: Cpu usage is low,full scan /
sec(sometimes its high around 6+),pages / sec =2 or 3/recompile / sec(always
0.00123...etc))
>
> pls help me ..in solving the following issues.
> 1) We r not able to figure out whether db is slow or is there any db
server issues...(optimzied queries and indexes are still on test server)
> 2) is there any web server issues..wot things we need to check with
IIS/Jrun or java..
> 3) If there is any deadlock or blocking session on one procedure..will it
hamper the performance of entire site or only web pages or processes related
with the tables used in procedures becomes locked and slow...
> 4) Is it advisable to restart sql server..this thing clients DBA are doing
more often whenver sites becomes slow...or may be webserver ..and after this
they found site works fine.
>
> Pls help me in finding solution or forward to concerned expertise persons.
> WE ARE TRYING TO FIGURE OUT PROBLEM FROM LAST 10 DAYS BUT FAILED...
>
Showing posts with label solving. Show all posts
Showing posts with label solving. Show all posts
Monday, February 20, 2012
Locks and Blocking
I am working on solving performance problems for a client experiencing
frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
application is a self-developed VB6 application that is very resource
intensive. With about 150 simultaneous users CPU utilization frequently
exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiring
all users to exit and the server to be rebooted.
Their programming model uses ADO recordsets. Once a recordset is fetched to
the application and displayed on the form, the rsX variable is set to nothing
and the user can update the form. When the OK button is pressed on the form,
the application code does the following:
strSQL = "Select * From Contact Where 1=2"
Set rsX = Openrecordset(strSQL)
Rsx.Field1 = Form!Field1
...
...
Rsx.Fieldn = Form!Fieldn
Rsx.Update
Question: Does the grabbing of a recordset in this manner lock the whole
table since there is no individual record or page to lock? An if 20 users did
this simultaneously, would that lead to a blocking issue?
Any insight would be appreciated!
Larry Menzin
American Techsystems Corp.
These links may help. The first link is a VB link about locking -
looks like you definitely might have some locking issues.
http://msdn.microsoft.com/library/de...oidlocking.asp
http://www.sql-server-performance.co...cing_locks.asp
http://msdn.microsoft.com/library/de...on_7a_1hf7.asp
|||Do each of the tables have a valid PK Constraint defined on them? Is the
Update issued by ADO using the PK to do the update? If not it is more
likely the Update is causing the problems. That is a pretty lame way to
update rows anyway. They should create a stored procedure to do the update
and call that from the front end instead.
Andrew J. Kelly SQL MVP
"Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...
>I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization,
> requiring
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched
> to
> the application and displayed on the form, the rsX variable is set to
> nothing
> and the user can update the form. When the OK button is pressed on the
> form,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users
> did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.
|||Hi,
When u execute a select statement it will fetech all the columns and
rows now imagine if the table has 40 or 45 coulmns then how much
resource it will use .
u should field name and ur where clause.
Secondly when the recodset work is done close the recordset.
hope this help
from
killer
Andrew J. Kelly wrote:[vbcol=seagreen]
> Do each of the tables have a valid PK Constraint defined on them? Is the
> Update issued by ADO using the PK to do the update? If not it is more
> likely the Update is causing the problems. That is a pretty lame way to
> update rows anyway. They should create a stored procedure to do the update
> and call that from the front end instead.
> --
> Andrew J. Kelly SQL MVP
>
> "Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
> news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...
|||Hi
Run profiler and see what/where this is happening. You may want to look for
items in the locking event class and use the read/write/duration values to
find queries that take a long time and do a large number of I/O. You will
then be able to analyse query plans and indexes, or maybe even want to pass
the output of a trace into the index tuning wizard and see what it comes up
with.
John
"Larry Menzin" wrote:
> I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiring
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched to
> the application and displayed on the form, the rsX variable is set to nothing
> and the user can update the form. When the OK button is pressed on the form,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.
frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
application is a self-developed VB6 application that is very resource
intensive. With about 150 simultaneous users CPU utilization frequently
exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiring
all users to exit and the server to be rebooted.
Their programming model uses ADO recordsets. Once a recordset is fetched to
the application and displayed on the form, the rsX variable is set to nothing
and the user can update the form. When the OK button is pressed on the form,
the application code does the following:
strSQL = "Select * From Contact Where 1=2"
Set rsX = Openrecordset(strSQL)
Rsx.Field1 = Form!Field1
...
...
Rsx.Fieldn = Form!Fieldn
Rsx.Update
Question: Does the grabbing of a recordset in this manner lock the whole
table since there is no individual record or page to lock? An if 20 users did
this simultaneously, would that lead to a blocking issue?
Any insight would be appreciated!
Larry Menzin
American Techsystems Corp.
These links may help. The first link is a VB link about locking -
looks like you definitely might have some locking issues.
http://msdn.microsoft.com/library/de...oidlocking.asp
http://www.sql-server-performance.co...cing_locks.asp
http://msdn.microsoft.com/library/de...on_7a_1hf7.asp
|||Do each of the tables have a valid PK Constraint defined on them? Is the
Update issued by ADO using the PK to do the update? If not it is more
likely the Update is causing the problems. That is a pretty lame way to
update rows anyway. They should create a stored procedure to do the update
and call that from the front end instead.
Andrew J. Kelly SQL MVP
"Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...
>I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization,
> requiring
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched
> to
> the application and displayed on the form, the rsX variable is set to
> nothing
> and the user can update the form. When the OK button is pressed on the
> form,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users
> did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.
|||Hi,
When u execute a select statement it will fetech all the columns and
rows now imagine if the table has 40 or 45 coulmns then how much
resource it will use .
u should field name and ur where clause.
Secondly when the recodset work is done close the recordset.
hope this help
from
killer
Andrew J. Kelly wrote:[vbcol=seagreen]
> Do each of the tables have a valid PK Constraint defined on them? Is the
> Update issued by ADO using the PK to do the update? If not it is more
> likely the Update is causing the problems. That is a pretty lame way to
> update rows anyway. They should create a stored procedure to do the update
> and call that from the front end instead.
> --
> Andrew J. Kelly SQL MVP
>
> "Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
> news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...
|||Hi
Run profiler and see what/where this is happening. You may want to look for
items in the locking event class and use the read/write/duration values to
find queries that take a long time and do a large number of I/O. You will
then be able to analyse query plans and indexes, or maybe even want to pass
the output of a trace into the index tuning wizard and see what it comes up
with.
John
"Larry Menzin" wrote:
> I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiring
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched to
> the application and displayed on the form, the rsX variable is set to nothing
> and the user can update the form. When the OK button is pressed on the form,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.
Locks and Blocking
I am working on solving performance problems for a client experiencing
frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
application is a self-developed VB6 application that is very resource
intensive. With about 150 simultaneous users CPU utilization frequently
exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiring
all users to exit and the server to be rebooted.
Their programming model uses ADO recordsets. Once a recordset is fetched to
the application and displayed on the form, the rsX variable is set to nothin
g
and the user can update the form. When the OK button is pressed on the form,
the application code does the following:
strSQL = "Select * From Contact Where 1=2"
Set rsX = Openrecordset(strSQL)
Rsx.Field1 = Form!Field1
...
...
Rsx.Fieldn = Form!Fieldn
Rsx.Update
Question: Does the grabbing of a recordset in this manner lock the whole
table since there is no individual record or page to lock? An if 20 users di
d
this simultaneously, would that lead to a blocking issue?
Any insight would be appreciated!
Larry Menzin
American Techsystems Corp.These links may help. The first link is a VB link about locking -
looks like you definitely might have some locking issues.
http://msdn.microsoft.com/library/d...
idlocking.asp
http://www.sql-server-performance.c...ucing_locks.asp
http://msdn.microsoft.com/library/d... />
a_1hf7.asp|||Do each of the tables have a valid PK Constraint defined on them? Is the
Update issued by ADO using the PK to do the update? If not it is more
likely the Update is causing the problems. That is a pretty lame way to
update rows anyway. They should create a stored procedure to do the update
and call that from the front end instead.
Andrew J. Kelly SQL MVP
"Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...
>I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization,
> requiring
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched
> to
> the application and displayed on the form, the rsX variable is set to
> nothing
> and the user can update the form. When the OK button is pressed on the
> form,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users
> did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.|||Hi,
When u execute a select statement it will fetech all the columns and
rows now imagine if the table has 40 or 45 coulmns then how much
resource it will use .
u should field name and ur where clause.
Secondly when the recodset work is done close the recordset.
hope this help
from
killer
Andrew J. Kelly wrote:[vbcol=seagreen]
> Do each of the tables have a valid PK Constraint defined on them? Is the
> Update issued by ADO using the PK to do the update? If not it is more
> likely the Update is causing the problems. That is a pretty lame way to
> update rows anyway. They should create a stored procedure to do the updat
e
> and call that from the front end instead.
> --
> Andrew J. Kelly SQL MVP
>
> "Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
> news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...|||Hi
Run profiler and see what/where this is happening. You may want to look for
items in the locking event class and use the read/write/duration values to
find queries that take a long time and do a large number of I/O. You will
then be able to analyse query plans and indexes, or maybe even want to pass
the output of a trace into the index tuning wizard and see what it comes up
with.
John
"Larry Menzin" wrote:
> I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiri
ng
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched t
o
> the application and displayed on the form, the rsX variable is set to noth
ing
> and the user can update the form. When the OK button is pressed on the for
m,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users
did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.
frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
application is a self-developed VB6 application that is very resource
intensive. With about 150 simultaneous users CPU utilization frequently
exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiring
all users to exit and the server to be rebooted.
Their programming model uses ADO recordsets. Once a recordset is fetched to
the application and displayed on the form, the rsX variable is set to nothin
g
and the user can update the form. When the OK button is pressed on the form,
the application code does the following:
strSQL = "Select * From Contact Where 1=2"
Set rsX = Openrecordset(strSQL)
Rsx.Field1 = Form!Field1
...
...
Rsx.Fieldn = Form!Fieldn
Rsx.Update
Question: Does the grabbing of a recordset in this manner lock the whole
table since there is no individual record or page to lock? An if 20 users di
d
this simultaneously, would that lead to a blocking issue?
Any insight would be appreciated!
Larry Menzin
American Techsystems Corp.These links may help. The first link is a VB link about locking -
looks like you definitely might have some locking issues.
http://msdn.microsoft.com/library/d...
idlocking.asp
http://www.sql-server-performance.c...ucing_locks.asp
http://msdn.microsoft.com/library/d... />
a_1hf7.asp|||Do each of the tables have a valid PK Constraint defined on them? Is the
Update issued by ADO using the PK to do the update? If not it is more
likely the Update is causing the problems. That is a pretty lame way to
update rows anyway. They should create a stored procedure to do the update
and call that from the front end instead.
Andrew J. Kelly SQL MVP
"Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...
>I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization,
> requiring
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched
> to
> the application and displayed on the form, the rsX variable is set to
> nothing
> and the user can update the form. When the OK button is pressed on the
> form,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users
> did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.|||Hi,
When u execute a select statement it will fetech all the columns and
rows now imagine if the table has 40 or 45 coulmns then how much
resource it will use .
u should field name and ur where clause.
Secondly when the recodset work is done close the recordset.
hope this help
from
killer
Andrew J. Kelly wrote:[vbcol=seagreen]
> Do each of the tables have a valid PK Constraint defined on them? Is the
> Update issued by ADO using the PK to do the update? If not it is more
> likely the Update is causing the problems. That is a pretty lame way to
> update rows anyway. They should create a stored procedure to do the updat
e
> and call that from the front end instead.
> --
> Andrew J. Kelly SQL MVP
>
> "Larry Menzin" <LarryMenzin@.discussions.microsoft.com> wrote in message
> news:0DAF194C-3019-4E7C-AB0F-691B95911D0E@.microsoft.com...|||Hi
Run profiler and see what/where this is happening. You may want to look for
items in the locking event class and use the read/write/duration values to
find queries that take a long time and do a large number of I/O. You will
then be able to analyse query plans and indexes, or maybe even want to pass
the output of a trace into the index tuning wizard and see what it comes up
with.
John
"Larry Menzin" wrote:
> I am working on solving performance problems for a client experiencing
> frequent blocks on their server which has 4 CPUs and 4GB or RAM. Their
> application is a self-developed VB6 application that is very resource
> intensive. With about 150 simultaneous users CPU utilization frequently
> exceeds 90%. Yesterday their server froze at 100% CPU utilization, requiri
ng
> all users to exit and the server to be rebooted.
> Their programming model uses ADO recordsets. Once a recordset is fetched t
o
> the application and displayed on the form, the rsX variable is set to noth
ing
> and the user can update the form. When the OK button is pressed on the for
m,
> the application code does the following:
> strSQL = "Select * From Contact Where 1=2"
> Set rsX = Openrecordset(strSQL)
> Rsx.Field1 = Form!Field1
> ...
> ...
> Rsx.Fieldn = Form!Fieldn
> Rsx.Update
> Question: Does the grabbing of a recordset in this manner lock the whole
> table since there is no individual record or page to lock? An if 20 users
did
> this simultaneously, would that lead to a blocking issue?
> Any insight would be appreciated!
> --
> Larry Menzin
> American Techsystems Corp.
Subscribe to:
Posts (Atom)