[m-users.] ODBC library: Ony one transaction per connection .. ?

Volker Wysk post at volker-wysk.de
Mon Jan 17 21:11:31 AEDT 2022


Am Montag, dem 17.01.2022 um 20:10 +1100 schrieb Zoltan Somogyi:
> 2022-01-17 20:00 GMT+11:00 "Volker Wysk" <post at volker-wysk.de>:
> > This explains why there's only one transcation per connection, but it'scompletely contrary to what I've heard. AFAIK opening a connection is anexpensive operation...
> 
> Take a look at the git history of extras/odbc.m. It was added in 1997,and even then, it was not new. I would be extremely surprised ifthe tradeoff remained the same over the last quarter of a century ...
> Specifically, at that time, virtually all database operations requiredone or more disk accesses, because of the (by today's standards)tiny amount of main memory available. These disk accesses tookmuch more time than connection setup/teardown, which did *not*require disk access.

You always have the perfect answer.  :-)

I've taken a look at the implementation in odbc.m. It looks like it would be rather trivial to modify it, such that connections would be opened and closed explicitly. In case I really need this.

Cheers, Volker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20220117/967ed629/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220117/967ed629/attachment.sig>


More information about the users mailing list