INSERT Delay

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: ewm (ewm_at_discussions.microsoft.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 11:39:02 -0700

Background Information:
I have a VB program using ADO that makes entries using INSERT in a SQL 2000
database. All entries are made in pairs. Each insert statement that is
generated includes the date and time the insert statement was created. The
two text strings are concatenate into one string with a CRLF (vbCrLf) in
between. The two strings are then sent to the server using connection.Execute
(InsertString). These INSERTS occur every 15 - 45 seconds.
Problem:
A few times a day the inserts are delayed, sometimes by as much as 30-40
minutes. In some cases the first INSERT is executed and the second one is not
executed for several minutes. When this happens, there are several other
INSERTS that are executed between the two sent as a batch. I know this is
happening because I get two records in the table with the same timestamp
(from the program not from SQL 2000) but they have IDENTITY value field
values that are 100 - 300 values apart indicating one INSERT in the batch was
executed, INSERTS for follow on batches are executed, and then the second
INSERT of the first batch is executed. This does not happen all the time. In
a given workday, about 2000 - 2400 entries are made. This problem occurs 0 -
10 times in any one day.
Any ideas what is going on?

Thanks in advance,
ewm



Relevant Pages

  • Re: SQL Injection with JDBC
    ... fixed SQL instead of building the SQL dynamicly. ... At most, they may have included clauses dynamically, but in my own experience that type of code is very messy to maintain, and one winds up selecting entire query strings based on user input, not building the strings up piecemeal. ... The thing that Arne say "should not be used in real-world projects" is non-parametrized, non-prepared statements where the SQL string is built up entirely in text then executed as such. ... The thing that we recommend is the use of PreparedStatement to embed type-safe parameters into SQL statements that are not subject to such flaws. ...
    (comp.lang.java.programmer)
  • Re: 3vl 2vl and NULL
    ... "strings" specifically are so interesting to you. ... input that can be cast to a numeric type, ... but it is not expected that the DBMS is forcing you to do so. ... It seems you can't accommodate the SQL outcomes because it doesn't have a "shape" that you are comfortable with. ...
    (comp.databases.theory)
  • Re: UP -- patent restricted?
    ... some poor unsuspecting schmuck. ... Maybe there are capabilities in SQL that I'm totally ignorant of. ... After doing that I'd like to "ride the B-tree index" to visit and check all the entries for this client. ... When you need so many keys, i.e. you have so many functions, so much functionality, you don't have a lot of freedom to conform with what others have done. ...
    (comp.databases.pick)
  • Re: SQL Server Output Buffer
    ... I made the point on batch vs. transaction because I was helping someone fix ... This is not a bug in SQL 2000. ... SQL Server has this misfeature ...
    (microsoft.public.sqlserver.server)
  • Re: Performance Problem with Stored Procedure calls to Sql Server
    ... Look at this in SQL profiler. ... The strings contain XML. ... > Dim oRs As ADODB.Recordset ...
    (microsoft.public.data.oledb)