gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: esql documentation


From: James K. Lowden
Subject: Re: esql documentation
Date: Sun, 14 Nov 2021 15:31:37 -0500

On Fri, 5 Nov 2021 22:16:48 -0400
Michael Potter <pottmi@gmail.com> wrote:

> Is there any good documentation for esql usage with GnuCOBOL?

There is no good documentation, no.  There is almost no documentation.
I have yet to see any documentation for any esql project that
describes how to set ODBC options, or control transactions, for
example. 

> Any tips for us as we get started?

https://gitlab.cobolworx.com/gnucobol/sql

I proved to myself that contrib/esql can connect to a variety of
DBMSs via ODBC.  You might already have gone further than that
yourself.  

I did not attempt any performance measurements.  In my experience ODBC
is as efficient as any other client library for database applications.
But that is not to say that all database-access libraries are equal, or
for that matter, perfected.  If you encounter difficulties and want to
diagnose them, I can help you isolate the source of any delay.  

Database applications are fundamentatlly I/O bound (or should be) and
performance problems are almost always due to (sometimes intractable)
design errors either in the application or in the database itself. 

Simon's Postgres experience raised some questions about how
contrib/esql uses ODBC to support its API.  There might be some
opportunity to wring better performance from it under certain access
patterns.  

For example, applications that were originally designed for ISAM and
later adapted to SQL have a tendency to perform client-side JOINs: 

        do A:
                read one row from master table
                do B:
                        read one row from detail table
                repeat B
        repeat A

That kind of thing yields notoriously bad performance because it
prevents the DBMS from exploiting its features.  Any filtering happens
on the client, and the DBMS's caches and indices are mostly wasted.  

--jkl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]