ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old July 17th, 2003, 01:29 PM
james0812 james0812 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 james0812 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Filtering Process...

Hi,

I am setting up a page to receive http requests. The page will process the info and then store all the values into SQL database. The problem is the other server may send multiple requests with the same unique ID (up to 10 whithin 5 minutes) and I have to filter out duplicate records.

What will happen is...thousands of requests will come in everyday and everytime the code will have to check the whole table to check if it's already stored before inserting.

1. Would it be a lot of strain on the server?
2. Which of the following SQL statement is more effective? (providing each entry will have a 6 numbers unique ID stored in vchar format and Rdate in date format)

a. strSql = "select RID from tb_message where RID = '" &strid &"'"
b. strSql = "select RID from tb_message where RDATE = '" &date &"'"
strSql = strSql &" and RID = '" &strId &"'"


3. I have never use indexing before, would it be an idea to use it to speed up things? I don't think it will work as the table may change every few seconds but I may be wrong.

Many thanks

James

Reply With Quote
  #2  
Old July 17th, 2003, 11:08 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
Why do you have multiple servers submitting duplicate requests? Is it possible to set up one master and replicate out to your `slave` machines?
...
The strain will come only if you have the database server peforming the logic and error checking. Indexing and constraints will catch the violations and throw errors but that is not the most advisable way to handle this.

Reply With Quote
  #3  
Old July 18th, 2003, 02:22 AM
james0812 james0812 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 james0812 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy duplicate requests

Hi,

Many thanks for your suggestion.

The other server is actually sending http request upon receival of a SMS message. The request will be made upto 10 times within 10 minutes to ensure we receive it ok and it's up to us to filter out duplicate records.

Each request will come with an unique SMS ID number.

My logic is :

1. get all the values in the querystring
2. Check if smsid already exist in DB table.
3. If not then insert the record.

What do you think? I am just worry that we may get over 10,000 message everyday, which mean upto 100,000 requests will be sent to our server (90,000 of them duplicated). It also means the DB table will need to be checked 100,000 times and doing the insertion 10,000 times.


What do you think?

James

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Filtering Process...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway