Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Wednesday, March 28, 2012

row-fetch question

Hi everyone,
I ran Profiler to verify why users where complaining about the bad
performance of our web application. I saw thousands of continuous
cursoropens, fetch and close. I googled it and came across an article that
tackled about cursors. It mentioned about row-fetch. He mentioned that if
row-fetch is 1, it is very inefficient. I would like to know how I can get
the current value of row-fetch and how to modify it.
And also, am I correct that server-side api cursors are cpu-intensive?
Any help will be greatly appreciated.
Neil
The FetchBufferSize property can be set to increase the rows to fetchin a
single operation. The default is 100 unless the data source uses binary
large object (BLOB) storage, in that case the FetchBufferSize is ignored and
1 is used instead. So it really depends on the data you are querying.
Question. Is your web app calling a stored proc that has a cursor, calling a
tree of sub cursors, or your web app calling a recordset, then making
queries from the results set, etc?
"Neil" <neil-on-ht@.restricted.dyndns.org> wrote in message
news:efJy9nEqEHA.3592@.TK2MSFTNGP14.phx.gbl...
> Hi everyone,
> I ran Profiler to verify why users where complaining about the bad
> performance of our web application. I saw thousands of continuous
> cursoropens, fetch and close. I googled it and came across an article that
> tackled about cursors. It mentioned about row-fetch. He mentioned that if
> row-fetch is 1, it is very inefficient. I would like to know how I can get
> the current value of row-fetch and how to modify it.
> And also, am I correct that server-side api cursors are cpu-intensive?
> Any help will be greatly appreciated.
> Neil
>
|||Hi Dwinter,
I will have to dig in to the web-app because it is a third party
application.
I can ask the vendor about this.
What if it was calling a stored proc that has a cursor, calling a tree of
sub cursors, or your web app calling a recordset?
You can also read my reply to the other post today. This question is also
related to that. It's because, I am trying to troubleshoot an application
performance issue.
Thanks for you help.
Neil
"DWinter" <dwinter@.attbi.com> wrote in message
news:uo6fIzEqEHA.3708@.TK2MSFTNGP10.phx.gbl...
> The FetchBufferSize property can be set to increase the rows to fetchin a
> single operation. The default is 100 unless the data source uses binary
> large object (BLOB) storage, in that case the FetchBufferSize is ignored
> and
> 1 is used instead. So it really depends on the data you are querying.
> Question. Is your web app calling a stored proc that has a cursor, calling
> a
> tree of sub cursors, or your web app calling a recordset, then making
> queries from the results set, etc?
> "Neil" <neil-on-ht@.restricted.dyndns.org> wrote in message
> news:efJy9nEqEHA.3592@.TK2MSFTNGP14.phx.gbl...
>

row-fetch question

Hi everyone,
I ran Profiler to verify why users where complaining about the bad
performance of our web application. I saw thousands of continuous
cursoropens, fetch and close. I googled it and came across an article that
tackled about cursors. It mentioned about row-fetch. He mentioned that if
row-fetch is 1, it is very inefficient. I would like to know how I can get
the current value of row-fetch and how to modify it.
And also, am I correct that server-side api cursors are cpu-intensive?
Any help will be greatly appreciated.
NeilThe FetchBufferSize property can be set to increase the rows to fetchin a
single operation. The default is 100 unless the data source uses binary
large object (BLOB) storage, in that case the FetchBufferSize is ignored and
1 is used instead. So it really depends on the data you are querying.
Question. Is your web app calling a stored proc that has a cursor, calling a
tree of sub cursors, or your web app calling a recordset, then making
queries from the results set, etc?
"Neil" <neil-on-ht@.restricted.dyndns.org> wrote in message
news:efJy9nEqEHA.3592@.TK2MSFTNGP14.phx.gbl...
> Hi everyone,
> I ran Profiler to verify why users where complaining about the bad
> performance of our web application. I saw thousands of continuous
> cursoropens, fetch and close. I googled it and came across an article that
> tackled about cursors. It mentioned about row-fetch. He mentioned that if
> row-fetch is 1, it is very inefficient. I would like to know how I can get
> the current value of row-fetch and how to modify it.
> And also, am I correct that server-side api cursors are cpu-intensive?
> Any help will be greatly appreciated.
> Neil
>|||Hi Dwinter,
I will have to dig in to the web-app because it is a third party
application.
I can ask the vendor about this.
What if it was calling a stored proc that has a cursor, calling a tree of
sub cursors, or your web app calling a recordset?
You can also read my reply to the other post today. This question is also
related to that. It's because, I am trying to troubleshoot an application
performance issue.
Thanks for you help.
Neil
"DWinter" <dwinter@.attbi.com> wrote in message
news:uo6fIzEqEHA.3708@.TK2MSFTNGP10.phx.gbl...
> The FetchBufferSize property can be set to increase the rows to fetchin a
> single operation. The default is 100 unless the data source uses binary
> large object (BLOB) storage, in that case the FetchBufferSize is ignored
> and
> 1 is used instead. So it really depends on the data you are querying.
> Question. Is your web app calling a stored proc that has a cursor, calling
> a
> tree of sub cursors, or your web app calling a recordset, then making
> queries from the results set, etc?
> "Neil" <neil-on-ht@.restricted.dyndns.org> wrote in message
> news:efJy9nEqEHA.3592@.TK2MSFTNGP14.phx.gbl...
>> Hi everyone,
>> I ran Profiler to verify why users where complaining about the bad
>> performance of our web application. I saw thousands of continuous
>> cursoropens, fetch and close. I googled it and came across an article
>> that
>> tackled about cursors. It mentioned about row-fetch. He mentioned that if
>> row-fetch is 1, it is very inefficient. I would like to know how I can
>> get
>> the current value of row-fetch and how to modify it.
>> And also, am I correct that server-side api cursors are cpu-intensive?
>> Any help will be greatly appreciated.
>> Neil
>>
>

Monday, March 26, 2012

RowChanged

I'm trying to put a fix in on a web page I did awhile back. The email occasionally goes down on it. So I was going to write emails to a SQL Server Table, then every two minutes check for entries in the table, and send out the email if any exist, on success remove the record. I've done this. But running a thread for the life of the application and querrying every 2 minutes seems a little overkill. How can I, with C#/ASP.NET get an event for when a record is added to the database, so I can start the thread then, and also end it after it has successfully sent out all queued emails?

I've seen RowChanged, but not a lot of documentation on it's use, ie, does there have to be an open connection the whole time? Does there have to be a class overridden to catch the event?You should use a SQL Trigger.|||Actually, I'd probably create a SQL Server Agent Job that did that. You could schedule it to fire every couple of minutes. It's a service that's probably already running.

David

Friday, March 23, 2012

Row versioning in SQL 2000?

I replicate (transactional replication) my data entry database to a
read-only database. Both are SQL 2000+SP4. The web server reads the
read-only database. At times, there will be lots of changes in the data
entry database, thus lots of replications to the read-only database. I
am concerned that the replication may lock the data in the read-only
database, causing slow response to the web server.

I would like to use row versioning so that the read-only database can
supply old data when the same row is being written by replication. I
read that row versioning is a feature in SQL 2005. Is there any
versioning capability in SQL 2000?

Thanks(betbubble@.gmail.com) writes:

Quote:

Originally Posted by

I replicate (transactional replication) my data entry database to a
read-only database. Both are SQL 2000+SP4. The web server reads the
read-only database. At times, there will be lots of changes in the data
entry database, thus lots of replications to the read-only database. I
am concerned that the replication may lock the data in the read-only
database, causing slow response to the web server.
>
I would like to use row versioning so that the read-only database can
supply old data when the same row is being written by replication. I
read that row versioning is a feature in SQL 2005. Is there any
versioning capability in SQL 2000?


No.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx