Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 200,000 pageviews a day

Author  Topic 

azbatuk
Starting Member

19 Posts

Posted - 2001-11-27 : 14:53:14
Hello,

I am new to SQL and trying to learn. I don't have a clear idea on these Cursor and Lock types with regard to SQL queries. I think I do know enough when it is ADO recordset object.

What I do nowadays within my ASP pages is this:

SELECT statement example;
Sql = "SELECT * FROM members INNER JOIN settings ON members.memberid = settings.memberid WHERE members.memberid=" & Request("memberid")
Set RS = Conn.Execute(Sql)

UPDATE statement example;
Sql = "UPDATE members SET "
Sql = Sql & "email='" & email & "'"
Sql = Sql & ", siteurl='" & siteurl & "'"
Sql = Sql & " WHERE memberid=" & Request("memberid")
Conn.Execute(Sql)

INSERT statement example;
Sql="INSERT INTO members (membername, email, registerdate) values("
Sql = Sql & "'" & membername & "'"
Sql = Sql & ",'" & email & "'"
Sql = Sql & ",'" & date() & "'"
Conn.Execute(Sql)

As you can see, I don't use ADO Recordset object and there is no Cursor and Lock types.

What I want to know is if this is the right method or not ?

Imagine, you have an ASP page that receives 200,000 views a day, and there are SELECT, UPDATE and INSERTs in this page, and most of these queries are on the same table. Imagine a top websites list, for example, with 2,000 member websites with an average of 100 pageviews a day. And your ASP page is counting every hit they receive and checking certain conditions, writing hit counts in your SQL server and thus constructing a top list.

I am actually developing (or rather trying to develop) such an application for experimental purposes.

All help is greately appreciated. :)



AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2001-11-28 : 16:45:20
In another link [url]http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=10863[/url] where you posted this question, I answered it a little differently... There I talk about using a Command object and Stored Procedures. But as long as I'm looking at this question again, let me mention that the only way you'll know whether your method will work for your requirements is to get into stress-testing your web site. There are many tools available to do this, including a free one from Microsoft at [url]http://webtool.rte.microsoft.com[/url]. But be aware that stress-testing is at least as much art as it is science because of the number of assumptions you have to make.

Good luck!

-------------------
It's a SQL thing...
Go to Top of Page

azbatuk
Starting Member

19 Posts

Posted - 2001-11-28 : 17:01:09
AjarnMark,
I checked the test tool you mentioned. I think it will be very useful for me to decide which method I should use.
Thanks for help.


Learning is Living
Go to Top of Page
   

- Advertisement -