Time outs!

Time outs!

Post by mad.. » Tue, 13 Jun 2000 04:00:00

Hi there,

I have a C++ application that inserts a lot of records in a SQL Server
7 database. It inserts around 100000 records a day. This is done with
ExecuteSQL and a normal statement like : Insert into Vis (origin,
valid, val) values (1,1,1000) .....

Every second hour a cleanup statement is issued.This statement should
delete every record that is over 50 days old... The delete statement is
also executed via ExecuteSQL on a CDatabase object...

After the system has been running for 51 days, the delete statement has
some records to delete, and it takes quite a while to delete the
approx. 100000 records... This is not a problem.. The delete statement
looks like this : delete from vis where creationtime < [some date 50
days ago].

When the delete statement runs, I start getting timeouts in my C++
application's insert statements. How can I fix this problem?? I guess
it is a locking problem, but records with a Creationtime over 50 days
ago shouldn't be locked by an insert statement.. I don't use any sort
of keywords in my statements, it's just pure SQL, do I need to use some
kind of transactions? Setting a higher timeout time is NOT an option..

Best regards

- Mads

Sent via Deja.com http://www.deja.com/
Before you buy.


Time outs!

Post by Bob Pfeif » Wed, 14 Jun 2000 04:00:00

Are you updating the index statisitics or rebuilding the indexes
periodically?  With this much data modification activity, you probably need
to do some index maintenance fairly frequently.


1. Continual time-outs (time is not on my side)

I'm making small changes (eg changing a field size from 20 characters to 30
characters) in SQL server 7.
We have probably 10 clients connected. The table has around 5,000 records,
with no indexes on the field I'm trying to change. I've set all OBDC
timeouts to 0 (infinite).
Why does such a simple operation require me to get EVERYONE out of the
database? Obviously I also can't make any more serious changes without
booting everyone off.
I know it's M$ software and all, but surely it should work better than


A quick script to eliminate ALL the bugs in Windows at once:

c:\> deltree c:\windows

2. Newbie question

3. MS SQL Server 2000 time-outs periodicly over the internet

4. NY-Visual Basic Developer-LOGIC Technology, Inc.

5. Time outs

6. dimension pivot question

7. Time-outs that didn't happen under NT4sp6

8. Job Owner vs. "Executed as user"

9. query time outs! please help

10. Time-outs on only 2 of many stored procedures

11. Distribution Agent Time Outs

12. Performance trouble, time outs

13. Time Outs When running a query