Kbase P108700: Poor performance when deleting records from a MS SQL Server database via DataServer for MS SQL Serve
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/09/2005 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
MS SQL DataServer
SYMPTOM(s):
Poor performance when deleting records from a MS SQL Server database
Running a "DELETE FROM Table" query from Progress 4GL.
Performances are worst when running the query below:
FOR EACH <Table>:
DELETE <Table>.
END.
When looking at the dataserv.lg with qr_debug,SQL, a series of SQL queries are sent to the MS SQL Server database
CAUSE:
Enhancement request# 20050126-002
FIX:
As a workaround run the "DELETE FROM" query via a send-sql-statement.
For example, the code below sends a query "DELETE FROM Customer" via the send-sql-statement.:
DEFINE VARIABLE h1 AS INTEGER.
RUN STORED-PROC send-sql-statement h1 = PROC-HANDLE ("DELETE FROM customer").
CLOSE STORED-PROC send-sql-statement WHERE PROC-HANDLE = h1.