Filtering process....

Results 1 to 2 of 2

Thread: Filtering process....

  1. #1
    Join Date
    Dec 1969

    Default Filtering process....

    Hi, <BR><BR>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.<BR><BR>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&#039;s already stored before inserting.<BR><BR>1. Would it be a lot of strain on the server?<BR>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)<BR><BR>a. strSql = "select RID from tb_message where RID = &#039;" &strid &"&#039;"<BR>b. strSql = "select RID from tb_message where RDATE = &#039;" &date &"&#039;" <BR>strSql = strSql &" and RID = &#039;" &strId &"&#039;"<BR><BR><BR>3. I have never use indexing before, would it be an idea to use it to speed up things? I don&#039;t think it will work as the table may change every few seconds but I may be wrong.<BR><BR>Many thanks<BR><BR>James<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default If RID is the Primary Key...

    ...which it should be, since you say you know it is unique, then it will automatically be indexed. Yes, on the fly.<BR><BR>And, if RID is unique in that table, that what&#039;s the point of also qualifying on RDATE??? How can you find any less than one record?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts