Print Thread
Delete of record
#1659 02/09/01 05:00 PM
Joined: Apr 2000
Posts: 37
Oyten,Germany
S
Sven Offline OP
Member
OP Offline
Member
S
Joined: Apr 2000
Posts: 37
Oyten,Germany
Hi Marco,

if i delete a record with TOracleDataSet.Delete the following is done by DOA

1. create savepoint
2. reads ALL data of the record "for Update"
3. Delete record with rowid
4. commit

Why does DOA reads all! data in 2. ?
In my case it reads all longs and lobs, but this is not needed and on a slow ip-connection line it tooks very long.

Greetings
Sven


Greetings,
Sven
Re: Delete of record
#1660 02/12/01 06:27 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
It reads all data because this is a combined function that locks the record and checks if it has been changed.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Delete of record
#1661 02/12/01 06:47 PM
Joined: Apr 2000
Posts: 37
Oyten,Germany
S
Sven Offline OP
Member
OP Offline
Member
S
Joined: Apr 2000
Posts: 37
Oyten,Germany
Yes,

but assume the following SQl-Statement

select id, name from tablename

to delete a record DOA makes
select * from tablename.

If there are a lot of clob or long field, this take on a 64 k line very much time.
(and DOA can only compare the fields id and name)

Sven


Greetings,
Sven
Re: Delete of record
#1662 02/13/01 08:24 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
In that case the CLOB data will not be read, just the record data. But I see your point. Why should you fetch all columns when only a few need to be compared. The roAllFields option of the RefreshOptions causes these refresh, compare and some lock operations to re-execute the original SQL statement, with the where clause extended with the rowid. Unfortunately this does not affect the lock operation for a delete. I will add this to the enhancement requests.


------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.041s Queries: 13 (0.018s) Memory: 2.5124 MB (Peak: 3.0430 MB) Data Comp: Off Server Time: 2024-05-19 20:14:41 UTC
Valid HTML 5 and Valid CSS